DEV Community

S Dhivya Bharkavi
S Dhivya Bharkavi

Posted on

Print function 1

This is with and without python file saving difference also run in visual studio code

Image description

One difference if file name is print1, only run with correspond name and else file name with print2.py only run with include.py if not error appears

Image description

  1. Basic print function
  2. Using variables
  3. Printing multiple variables
  4. Formatted strings with f-strings
  5. Concatenation of strings
  6. Using escape sequences
  7. Printing quotes inside strings
  8. Raw strings to ignore escape sequences
  9. Printing numbers
  10. Printing results of expressions

Basic print function

Image description

Using variables

Image description

Printing multiple variables

Image description

Formatted strings with f-strings

Image description

Concatenation of strings

Image description

Image description

Using escape sequences

Image description

Printing quotes inside strings

Image description

Raw strings to ignore escape sequences

Image description

Printing numbers

Image description

Printing results of expressions

Image description

Top comments (0)