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 68 times
1

S.L. Barth is on codidact.com
- 8,198
- 71
- 51
- 66

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
- 18,255
- 14
- 57
- 171