0
How do i change line before a variable in Python?
I tried 'print("\n" + a)' , 'print(\n + a)', and a few others like that Edit: I got it to work with 'print("\n" + str(a))'. Is there an easier way of doing this?
1 Answer
+ 2
With the newer version of Python, you could just use an f string to display the variable:
print(f"\n{str(a)}")