len () is a function that give me the lenth of a string
and ther is in to check if a char or a sub string in a string or not
we can slect a specific index from string
as we have an string called name ="alaa ahmed"
and we want to get a char and skip anther we use
name [0:10:2] or name [::and step]# here not write a number mean thate start from the begining and till the end
it will return ...'aa he'
function input return an string so we cant use the entered number in arthmatics so we use int (input())
Share with your friends: |