Replace the spaces in the following bits of code so that it matches the requirements. Consider that the typing module is already imported. Please follow the PEP formatting rules and use the formatting provided in the code samples from the theory section - no missing or extra whitespaces. Mark the following function's return type as a string:
Type hints and collections
Type hints in action
Report a typo
Fill in the gaps with the relevant elements
def function1() [...]:
Mark the following function's return type as string:
def function1() :
return "This function should return a string!"
Mark the following function's return type as a set of floats:
def function2() :
return {1, 2, 3, 4} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.