+ 3

How to store data values from a tuple into a list?

6th Sep 2017, 6:38 AM
Ritwik Tripathi
Ritwik Tripathi - avatar
2 Antworten
+ 5
tupleA = (1,2,3) listA = list(tupleA) #[1,2,3] is that what you mean?
6th Sep 2017, 6:52 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 1
Tuple is immutable (unmodified) list. you can do with it all what you can with list but modify or change it. example, for x in TupleA: print(x) will work.
6th Sep 2017, 7:19 AM
yuri