a="life is hell"
print(len(a))
print(a[::1])
print(a[::2])
print(a[::-1])
print(a[-1::-1])
b="hell is life"
print(a,b)





while True:
    
    print('''
 1 Add
 2 Sub
 3 Mul
 4 Div
'''
)
    c=int(input("Enter Choice: "))
    a=int(input("Enter No 1: "))
    b=int(input("Enter No 2: "))
    if c==1:
        print(a+b)
    elif c==2:
        print(a-b)
    elif c==3:
        print(a*b)
    elif c==4:
        print(a/b)
    else:
        break
   
   
   
a=int(input("enter no="))
b=0
for k in range(1,a+1):
    print(b)
    b=b+k

print(b)


l=[10,20,100,70,50]
print(l)
a=60
l.append(a)
print(l)
l.remove(10)
print(l)
l.sort()
print(l)
a=l[-1::-1]
print(a)
o=print(len(l))


x=["orange","purple","red","yellow","blue"]
s=x[0::4]
print(s)



col=["orange","purple","red","yellow","blue"]
a="pink ".join(col)
print(a)
print(type(a))


   
   
   
   
   
   
   
  
 

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: