I'm practicing OOP on Python, but i would like to create a "loading screen" on python whichs prints:
>>>0%
>>>(_|_|_|_|_|_|_|_|_|_)
>>>Adding Oxygen...
#delete the last 3 lines and print*:
>>>1%
>>>(_|_|_|_|_|_|_|_|_|_)
>>>Adding Oxygen...
#delete the last 3 lines and print:
>>>2%
>>>(_|_|_|_|_|_|_|_|_|_)
>>>Adding Oxygen...
#repeat this until oxygen == 100% print:
>>>100%
>>>(■|■|■|■|■|■|■|■|■|■)
>>>Adding Oxygen...
Instead of:
0%
Adding oxygen...
1%
Adding oxygen...
2%
Adding oxygen...
3%
Adding oxygen...
4%
Adding oxygen...
5%
Adding oxygen...
6%
Adding oxygen...
7%
Adding oxygen...
8%
Adding oxygen...
9%
Adding oxygen...
(■|_|_|_|_|_|_|_|_|_)
10%
I tried to do this using "\r" but this deletes only the previous line and it doesn't work with this Should I use any kind of GUI library to make this posible?
What is the way to do this?