Construct an algorithm in Python to convert a string to uppercase.
hello world
def stringToUpper(str):
    return str.upper()

inputStr = "hello world"

outputStr = stringToUpper(inputStr)

print(outputStr)