id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

String Operationsstrlen3

prev  |  next  |  chance

len() returns the length of a string.

def strlen3(s, t):
    length = len(2 * s) + len(3 * t)
    return length
Function Call  Return Value
strlen3('ant', 'duck')
strlen3('', '')
strlen3('', '78')
strlen3('rock', 'sand')
strlen3('ex', 'ball')

Experiment with this code on Gitpod.io

⬅ Back