# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## strings

a="this is a string"
a
print(a)

# ## typical string properties

print(len(a))
print(type(a))
print(a[0])

# ## strings are immutable

#a[0]=2 INVALID
a="def" #valid as we aren't changing the string
b="abc"
c=a+b
print(c)

# ## no characters

print(type('s'))

# ## few functions for strings

a="Abc"
print(a.upper())
print(a)
print(a.lower())
print(a)
print(a.lower())
print(a.strip())
a=(a.strip())
a=a.strip()
print(a.isalpha())
print(a.isdigit())

# ## user input

a=input()
print(a)
a=int(input())
print(type(a))
#input function returns string



StarcoderdataJupyterScriptsDedupFiltered