##############
########################## Sequences#####################
##############
seq1 = "python"
seq2 = "123"
print(seq1)
print(seq2)

seq3 = "Introduction to Python"
print(seq3)

s3 = seq3[3]
print(s3)

s4 = seq3[1:5]
print(s4)
print(seq3[0:4])
print(seq3[:4])
print(seq3[7:])


seq3_new = "i" + seq3[1:]
print(seq3_new)

s5 = seq3 + "For Students"
print(s5)

s6 = seq3 + " For Students"

s7 = "For Students" + seq3
s8 = "For Students " + seq3
############
########################### Methods#######################
############
s1 = "welcome To python"
len(s1)

s1captal = s1.upper()
print(s1captal)

s1smal = s1.lower()
print(s1smal)

s1captalsmal = s1captal.lower()
print(s1captalsmal)

s1.count("o")
s1.count("tho")

s1.find("o")
s1.find("o",5)
s1.find("o",10)
s1.find("o",16)

"p" in s1
"to" in s1
"java" not in s1
################################
#######
sequence = "Introduction to python by faradars"

print("Length of sequence is: ", len(sequence))

s1 = sequence.find("dars")
print("The address of dars is: ", s1)

seq_new = sequence[:16] + "P" + sequence[17:26] + "F" + sequence[27:]
print(seq_new)

s1 = seq_new[6:len(seq_new)-4]
print("s2 is: ", s1)


if "tr" in sequence:
    print("tr exists")
else:
    print("tr doesnt exist")
    
print(s8)
