Python String Operations
Concatenation
>>>’Zend’ + ‘Anwar’
Zendanwar
>>>’Zend’ *3
ZendZendZend
Iterating Through String
>> count = 0
>>> for str in ‘Zend Anwar’:
if(str == ‘n’):
count += 1>>> print(count, “String Found”)
2 String Found
Concatenation
>>>’Zend’ + ‘Anwar’
Zendanwar
>>>’Zend’ *3
ZendZendZend
Iterating Through String
>> count = 0
>>> for str in ‘Zend Anwar’:
if(str == ‘n’):
count += 1>>> print(count, “String Found”)
2 String Found