Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Strings [문자열]

Regular Expressions

Cheatsheet

String concatenation

String formatting

String Interpolation / f-Strings (Python 3.6+)

  • you can embed arbitrary Python expressions, you can even do inline arithmetic with it

Template Strings (Standard Library)

  • Use template strings when handling formatted strings generated by users of your program, due to their reduced complexity, template strings are a safer choice.
    if user_given_input:
        use Template Strings
    else:
        if __version__ >= 3.6:
            use f-Strings
        else:
            use String formatting