-1

In my code, I use format() to return the value of converted minuets.

def convert(minutes):
    return'{seconds}'.format(seconds = minutes*60) 

Every time I use format to return a function it returns it with quotation marks ' '.

Input:

convert(10)

Output:

'600'

How do I use format to return the function without the quotation marks?

1 Answers1

0

This is because you are seeing the output directly from the console, and the variable is a string so python adds the quotation marks to let you know.

To remove them:

print(convert(10))