Way to constantly replace a line of code in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Way to constantly replace a line of code in python?

I made a simple calculator and for decoration purposes i want the output to replace a line of code constantly. For example: ------------------------ Your result is 0 ------------------------ _______________ Is there a way that the output could replace "------------------------" with "_______________" constantly in that line? If you do not undertand what i mean you can tell me so i can try to explain better

27th Aug 2021, 2:05 PM
Odnantiev
Odnantiev - avatar
5 Answers
+ 2
Please explain more, mabey give a few more examples
27th Aug 2021, 2:06 PM
Slick
Slick - avatar
+ 1
Slick Delicate Cat to explain better: Imagine i want to sort of "animate" a line of code. For example in here. The calculator i made outputs the result like this: ------------------------ Your result is 5 ------------------------ And i want to sort of animate the "------------------------" that is on top and below the result. Imagine those lines changing symbols for aesthetic or decoration purposes. Is it more understandable now? Im a bit bad at explaining 😂
27th Aug 2021, 5:28 PM
Odnantiev
Odnantiev - avatar
+ 1
Delicate Cat yes something like that yes
27th Aug 2021, 5:55 PM
Odnantiev
Odnantiev - avatar
+ 1
Delicate Cat yeah i was trying in pycharm but the thing is that i dont know what to use to make that
27th Aug 2021, 6:00 PM
Odnantiev
Odnantiev - avatar
+ 1
Delicate Cat ok i think i get it. Im still a beginner tho 😅 but thats pretty cool! Thank you! I typed it in the calculator and it works
27th Aug 2021, 6:33 PM
Odnantiev
Odnantiev - avatar