Posts

Showing posts from June, 2017

Python Basics

#basic python import datetime today = datetime.date.today() print("Today date is :", today) print (' ') '''Loopoing - control flow in python ''' #WHILE i = 0 while (i <= 5):     print ('The value of while loop :', i)     if(i == 5):         break     else:         i += 1 #FOR for i in range(5):       print ('This is for loop:',i)       for j in range(0,10,2):     print ('for loop skips 2 elem:',j) print('---------------------------------------------------------') ''' Multiline comment - This is LIST examples ''' primes = list() rmv = list() alphabets = ['A', 'B', 'C'] print('This is list:', alphabets) print('This is 1st element :', alphabets[0]) # Check if element exist and append if 'D' not in alphabets:     alphabets.append('D')     print('This is list:', alphabets)     nxt = ['E...