Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (50.2k points)

I know that in C++, this \n is used for giving any spaces but I want to know what we can use in Python?

I don't want to have to use: 

print ("   "). 

1 Answer

0 votes
by (108k points)

Instead of that, you can use the below code:

x=' ';

The above will print one space:


The below code will print 10 spaces:


The below code will print 10 whites spaces between Hello & World on the Python console:


Related questions

0 votes
1 answer
0 votes
0 answers
0 votes
1 answer
asked Jul 16, 2019 in Python by leealex956 (7.3k points)
0 votes
1 answer

Browse Categories