Notes
![]() ![]() Notes - notes.io |
print("hello")
x =10
y ='iitm'
z = 7+8j
a = True
b = 84.3
print(type(x) ,type(y),type(z),type(a),type(b))
"""
# import keyword
# data = keyword.kwlist
# print(len(data))
# for i in data:
# print(i )
# sum of three number in python
# x = int(input('enter a number'))
# y = int(input('enter a number'))
# z = int(input('enter a number'))
# print(x+y+z)
#
#swapint of two no
# with
#withoutt third
# import pdb
# a = 10
# b = 20
# pdb.set_trace()
# c=a
# a=b
# b=c
# print("a" ,a)
# print("b" ,b)
# s = 'IITM DELHI'
# x = s.split()
# for i in x:
# if i=='IITM':
# print(i)
# print(s[0])
# print(s[1:3])
# spliting of string
# k = 'New Delhi'
# x = k.split()
# print(x)
#Removing white space
#rstrip() ---> to remove spaces from right
#lstrip() ---> to remove spaces from left
#strip() ---> to remove spaces from both sides
# s= "Python"
# print(s.index('o'))
# d = s.replace("Python",'Django')
# print(type(d))
# print(d,'ddddddddd')
# print(s ,'sssss')
# s= 'iitm'
# print(s.upper(),s.lower(),s.capitalize())
# list in python
# list is stored heterogenous data and it is changable in nature
# x =[1,2,1,1,'monday',09.45]
# print(type(x))
# print(x)
# print(x[0])
# x.append('add last')
# print(x)
# print(x.count(1))
# x.remove(1)
# print(x)
# x.reverse()
# print(x)
# x.pop(3)
# print(x)
# x= [11,22,5,6,7,8,9,3]
# y= [111,224,55,66,7,8,9,3]
# z = [i for i in x for j in y if i==j ]
# print(z)
# print odd number with list comprehenstions
# y = [i for i in x if i%2!=0]
# print(y)
# List :
# create a lsit of square number
# s = [1,2,3,4,5]
# x = [i**2 for i in s]
# print(x)
# cubes = [i**3 for i in range(1,9)]
# print(cubes)
# s = 'Python is awsome'
# d = [ i for i in s if i in ['a','i','o','e','u']]
# print(d)
# d = [1,2,3,5,7,22,33,'hi',90.87,8+5j]
# x = [i for i in d if type(i) == int if i%2==0]
# print(x)
#
# s = ['we','are','learning','python']
#
# x = [i[0] for i in s]
# print(x)
# y = x
# z = x.copy()
# print(y)
# print(type(y),type(z))
# taking a list input and get only even number
# d = eval((input('enter a list')))
# for i in d:
# if i%2 ==0:
# print(i)
#
# s = "Learning is continous process"
# x = s.split()
# print(x)
# ["Learning", "is" ,"continous", process]
#
# t = 1,2,3,4,'hi'
# print(type(t))
# print(t[-2])
# # by using tuple function
# t1 = tuple(range(1,7))
# print(type(t1))
# print(t1)
# tuple packing and unpacking
# tuple comprehension
# print the cubes of 1 to 5 by tuple comprehension
# t = (x**3 for x in range(1,6))
# print(t,type(t))
# for i in t:
# print(i, end= ' ')
# WAP to take input in tupleand print its sum and average
#
# t = eval(input('enter tuple'))
# sum =0
# for i in t:
# sum =i+sum
# print('sum is ',sum)
# print('average is ',sum/len(t))
s = {1,4,5,'hi','bye','hi'}
#print(len(s))
#print(s)
#s.add('python')
#print(len(s))
#s.update(['red','green'])
#print(s)
#s.pop()
#print(s)
#s.remove('red')
#print(s)
#s.clear()
#print(s)
#del s
#print(s)
#print(s)
#print(s[2])
#print(s,type(s))
s1 = {1,2,3,4,5,6}
s2 = {2,3,7,9,6}
# find union and intersection
# for i in s1:
# for j in s2:
# if i==j:
# print(i,end=' ')
# print()
# print(s1.intersection(s2))
# s=[1,3,4,3,5,1,7]
# print(set(s))
# WAP to print the different vowels present in the given word
word = 'iitm collage'
s =set(word)
print(s)
vowels = {'a','e','i','o','u'}
d = s.intersection(vowels)
print(d)
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team