Define connect(host="localhost", port=5432, ssl=True) that returns host + ":" + str(port) + ":ssl="
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Define connect(host="localhost", port=5432, ssl=True) that returns host + ":" + str(port) + ":ssl=" + str(ssl). Print connect(), then print connect(port=3306), then print connect(ssl=False).
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.