+ 1
Can I assign a variable to another variable in python?
6 Antworten
+ 2
newvariable = oldvariable
+ 1
It was intended to be like this: q1 is a vocabulary and q1 is the translation to that specific vocab. The user has to input all q and a variables, the vocabs are being randomly asked and the user has to enter the translation. It basically looks if entered and
given translation correspond. I hope you could understand😅
0
No, I mean if I have the variables q1-5 and a1-5 and q1 belongs to a is there a way to say if ax is used qx is used too
0
[clarification] By "-" I think you mean "through", so "q1 through q5" and "a1 through a5", and you'd like something to happen to two connected variables at a time (possibly with "a" being a "master" variable and the "q" variables performing identical actions).
I suspect what you're going to have to do is subclass the type and then override operators.
To help others answer, can you give an example of "used" and what the effects of "use" would ideally be?
0
It wasn't meant like this but okay