I am trying to build a game.
The game will have an item called a "pulsating crystal" (I am using \033[1;31;40m] to change the items colour), I want to it to be rainbow, so it keeps changing colours, without deleting everything else in the terminal. I used print(\033c) to clear the terminal but I just want to print the last line. I am sorry if the question is unclear or repetitive, or has another answer but I couldn't find another clear answer for my problem. PS I use Linux.
Asked
Active
Viewed 61 times
1
S.L. Barth
- 8,058
- 71
- 49
- 63
Dom
- 11
- 2
-
please share the relevant code you have so far – Remya CV Dec 20 '16 at 06:14
1 Answers
0
I just want to print the last line.
To print a line repeatedly, just override the line ending \n by giving the keyword argument end='\r' to print().
Armali
- 16,557
- 13
- 53
- 152