Skip to main content
Engineering LibreTexts

2.9: String Operations

  • Page ID
    3000
  • [ "article:topic", "authorname:severancec", "python (language)", "jupyter:python", "license:ccbyncsa" ]

    The + operator works with strings, but it is not addition in the mathematical sense. Instead it performs concatenation, which means joining the strings by linking them end to end. For example:

    Code \(\PageIndex{1}\) (Python):

    
    first = 10
    second = 15
    print(first+second)
    
    first = '100'
    second = '150'
    print(first + second)
    
    
    

    The output of this program is 100150.