0
How to create a new variable based on other variable in python?
2 Answers
+ 12
a = 42
b = a
- 1
if its a int or float...
p=5
q=p
is okay.....
but if its a list...
p=[...]
then fr creat another
u need to do
q=p.copy()
if u do...q=p
*/whenever u change q , p will also be changed/*