0

How to create a new variable based on other variable in python?

12th Nov 2017, 4:35 AM
Bishu Giri
Bishu Giri - avatar
2 Answers
+ 12
a = 42 b = a
12th Nov 2017, 4:38 AM
qwerty
qwerty - avatar
- 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/*
12th Nov 2017, 5:02 AM
sayan chandra
sayan chandra - avatar