print ('{name} wrote a {book}'.format(name="Karthik",book="A byte of Python")) print ('The value of the variable is {0:.4f}'.format(1.0/3)) print ('The value of the new variable is {0:4.8f}'.format(0.9987397988734834e-4)) print ('The value of the variable is {0:e}'.format(0.86343274)) print('This is the first line \nThis is the second line') print(r'This is the first line \n and this is also the same line :)')
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question