Len is a function that give me the lenth of a string



Download 15.21 Kb.
Date25.12.2021
Size15.21 Kb.
#57978
len

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())
Download 15.21 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page