24
loading...
This website collects cookies to deliver better user experience
x = 10
y = "MachineLearning.org.in"
z = 3.14
print(x)
print(y)
print(z)
x = 10
x = "MachineLearning.org.in"
print(x)
a = b = c = 10
print(a,b,c)
a,b,c = 10,3.14,"MachineLearning.org.in"
print(a)
print(b)
print(c)
x = str(3)
print(x)
y = int(3)
print(y)
z = float(3)
print(z)
x = str(3)
print(type(x))
y = int(3)
print(type(y))
z = float(3)
print(type(z))
n = input("Enter any value:")
print(n)
print(type(n))
n = int(input("Enter any value:"))
print(n)
print(type(n))
n = float(input("Enter any value:"))
print(n)
print(type(n))
n = str(input("Enter any value:"))
print(n)
print(type(n))
x = "Learning"
print("Machine " + x)
x = "Machine "
y = "Learning "
z = x + y
print(z)
a = 10
print(a)
del a
print(a)
s = "MachineLearning.org.in"
print(s) # Prints complete string
print(s[0]) # Prints first character of the string
print(s[7:15]) # Prints characters starting from 3rd to 5th
print(s[7:]) # Prints string starting from 3rd character
print(s * 2) # Prints string two times
print('www.' + s) # Prints concatenated string
print(s[:]) # Prints complete string with range start to end
print(s[::]) # Prints complete string with range start to end with increment 1
print(s[::2]) # Print String with increment of 2
print(s[-1]) # print last character of a string
print(s[-3:]) # print last 3 character of a string
L = [10,3.14,"Machine",45,'Learning',78.98,69,'.org.in']
print(L)
print(L[:])
print(L[::])
print(L[0])
print(L[2:5])
print(L[2:])
print(L[:5])
print(L[-1])
print(L[-3:])
L1 = [10,20,30]
L2 = [40,50,60]
print(L1 + L2)
L1 = [10,20,30]
print(L1 * 3)
T = (10,3.14,"Machine",45,'Learning',78.98,69,'.org.in')
print(T)
print(T[:])
print(T[::])
print(T[0])
print(T[2:5])
print(T[2:])
print(T[:5])
print(T[-1])
print(T[-3:])
T1 = [10,20,30]
T2 = [40,50,60]
print(T1 + T2)
T1 = [10,20,30]
print(T1 * 3)
d = {}
print(d)
d = {'Name':'Kevin','Age':34,'Marks':89.58}
print(d)
print(d['Name'])
print(d['Age'])
print(d['Marks'])
print(d.keys())
print(d.values())
print(d.items())