String Concatenation | Python Tutorial

Поділитися
Вставка
  • Опубліковано 25 сер 2024
  • How to concatenate strings in Python, including the + operator, the += operator, the join() method, the format() method, the string formatting operator %, and formatted string literals (f-strings). Source code: github.com/por.... Check out www.portfolioc... to build a portfolio that will impress employers!

КОМЕНТАРІ • 7

  • @niborj4172
    @niborj4172 Рік тому +1

    Very nice video, specifically was triying to solve the error with triying to print str with int, solved it very fast thanks.

  • @dev_ression
    @dev_ression Рік тому +1

    Very good explanation bro, similar to JS string concatenation

    • @PortfolioCourses
      @PortfolioCourses  Рік тому +2

      Thank you, I'm glad you enjoyed it! :-) And yes it's a bit like JavaScript's string concatenation.

  • @kawaiihikari0
    @kawaiihikari0 Рік тому +1

    Instead of str(speed) can I use int(speed)? Example: print(int(speed) + int(units)) Would that work too?

    • @PortfolioCourses
      @PortfolioCourses  Рік тому +1

      Great question! :-) No, because the + operator will concatenate strings but not int values.

    • @kawaiihikari0
      @kawaiihikari0 Рік тому

      @@PortfolioCourses gotcha thank you

  • @beamc3246
    @beamc3246 7 місяців тому

    KUDOS Bro