{}
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
run-icon
main.py
def foo() -> None: a: bytes b: int a = b'foo' # Expression b'' is of type `bytes` which is the expected type. This works. b = "Foo" # Expression "Foo" is of type `str` which isn't the expected type (int). This won't pass type checking. print(a, b) foo()
Output