• Profile
  • Resume
  • Portfolio
  • Blog
Avatar

Nelson Silva

A human. Being. Coffee lover.

Blog

I Write My Thoughts Here

print() function and Strings in Python

September 14, 2021 Python

In this post, you will learn how to work with the print() function and with strings so that you can use that same knowledge and thus evolve.

  • the print() function prints its entire contents to the command line;
  • a string is a set of characters (letters, numbers and/or symbols);
  • all strings are initialized and ended with apostrophes (‘string’) or with quotation marks (“string”);
  • the escaped character is \ and aims to make the character that follows part of the string.
print('We are using the print() function and I am a string.')
print("I'm still a string.")
print('Maria said that Miguel was "sick".') # Maria said that Miguel was "sick".
print('I\'m writing in English.') # I'm writing in English.
print('Caffeine', 'Algorithm') # Caffeine Algorithm

Don’t forget to watch the video and you can always read this post in Portuguese.

Happy coding!

Previous Next

Categories

  • Announcements
  • Python
  • C#
  • Java
  • Go

Latest Posts

  • for Loop in Go
    May 5, 2022
  • Switch in Go
    May 4, 2022
  • Comparison Operators in Go
    May 3, 2022
+351913416022
contact@nelsonsilvadev.com
Porto, Portugal
Nelson Silva © 2022 All Rights Reserved