Help-me in this Python code | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Help-me in this Python code

Why this code isn't printing 1 to 99 and 99 to 1? https://code.sololearn.com/c6PW35WGpwId/?ref=app

17th Feb 2020, 9:18 PM
João Guilherme Agostinho Santos
João Guilherme Agostinho Santos - avatar
3 ответов
+ 1
Amazing! Now it's working! Thank you very much :3
17th Feb 2020, 10:13 PM
João Guilherme Agostinho Santos
João Guilherme Agostinho Santos - avatar
0
When i'm calling the method "num_rev.reverse()" it's reversing "num" as well.
17th Feb 2020, 9:28 PM
João Guilherme Agostinho Santos
João Guilherme Agostinho Santos - avatar
0
So... It's like i'm giving a nickname to num, not creating a new object, right? How do i copy num to a new object called num_rev?
17th Feb 2020, 9:47 PM
João Guilherme Agostinho Santos
João Guilherme Agostinho Santos - avatar