Write a small python function that accepts two parameters wh

Write a small python function that accepts two parameters which are assumed to be Strings. Calculate and return the length of the Strings combined. You are essentially writing your own len function for two Strings. To make this easier, you may utilize the built-in len function.

Solution

def Strf(str1,str2):
   str3=str1+str2

   c=0
   for x in str3:
       c=c+1
   return c

print \"Enter string 1\"
str1=raw_input()
print \"Enter string 2\"
str2=raw_input()
print Strf(str1,str2)

===================================

Enter string 1
aks
Enter string 2
bsd
6

Write a small python function that accepts two parameters which are assumed to be Strings. Calculate and return the length of the Strings combined. You are esse

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site