Programming in Python Functions
Programming in Python Functions
1. Write a function in Python to swap() first half of the elements with the
second half of the elements. Also implement this function in a Python
Program
Example:
List = [1,2,3,4,5,6,7,8,9,10]
Result = [ 6,7,8,9,10,1,2,3,4,5]
2. Write a Python Program to read a text file. Find out the total number of
words available in this file.
3. Write a program in Python to read a text file line by line and print it on the
screen.
4. Write a program in python to read a text file and remove all the lines that
contain the character `a’ in a file and write it to another file.
*************************************************************