because the upper(method returns stringyou can call method on that string also try entering 'hello world!upper(lower(into the interactive shell'hello world!upper(lower('hello world!'hello world!upper(evaluates to the string 'hello world!'and then string' lower(method is called this returns the string 'hello world!'which is the final value in the evaluation 'hello world!upper(lower( 'hello world!lower( 'hello world!the order is important 'hello world!lower(upper(isn' the same as 'hello world!upper(lower()'hello world!lower(upper('hello world!that evaluation looks like this'hello world!lower(upper( 'hello world!upper( 'hello world!if string is stored in variableyou can call string method on that variable look at this examplespam 'hello world!spam upper('hello world!this does not change the value in spam the spam variable will still contain 'hello world!note that the integer and float data types don' have any methods