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

'''
Smallest Meaningful Component in a program
    Keywords, Identifiers, Literals, Operators
'''

# +
'''
Keywords - They are special Reserved Words
            like- True, False, Class, Continue, else if, etc
'''
True = a

#we cannot store variable into a keyword
# -

'''
Identifiers - Identifiers are names used for variables, functions or objects
    Rules - No Special character except _(underscore).
          - Identifiers are case sensitive.
          - First letter cannot be a digit.
'''

student = "Nayan"

Student = "Rajani"

student

Student

'''
Literals - Literals are constants in python
    - it is a constant, and it won't be changed
'''

a = "Nayan" # it is a literals

'''
Strings - Strings are sequence of characters enclosed within single quotes(''), double quotes(""), or triple quotes(''' ''')
        - "Nayan"
        - 'Nayan'
'''

str1 = 'This is my String'
str1

str2 = "This is my double String"
str2

str3 = '''This is my String,
and this will be
'''
str3

#Extracting Individual Character from string
my_string = "My name is is Nayan"
my_string[-1], my_string[0], my_string[5:13]

# String Function
len(my_string)

my_string.lower()

my_string.upper()

my_string.replace('e','z')

my_string.replace('z','e')

my_string.count('Nayan')

my_string.count('is')

my_string.find('nayan')

my_string.find('Nayan')

# +
new_string = 'I Like Apples, water melon, Mangoes'

new_string.split(',')

StarcoderdataJupyterScriptsDedupFiltered