+ 1

Can I assign a variable to another variable in python?

20th Dec 2018, 5:22 PM
anonymous
anonymous - avatar
6 Antworten
+ 2
newvariable = oldvariable
20th Dec 2018, 5:52 PM
Gordon
Gordon - avatar
+ 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😅
20th Dec 2018, 10:01 PM
anonymous
anonymous - avatar
21st Dec 2018, 1:29 AM
ki mir12345
ki mir12345 - avatar
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
20th Dec 2018, 6:41 PM
anonymous
anonymous - avatar
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?
20th Dec 2018, 9:53 PM
Kirk Schafer
Kirk Schafer - avatar
0
It wasn't meant like this but okay
21st Dec 2018, 8:17 AM
anonymous
anonymous - avatar