Given a team name, find the youngest player on that team (the one with the most recent date of birth). Report that player's name and date of birth (formatted YYYY-MM-DD).
Read the team name from the input file (the whole file content, stripped, is the team name).
Output exactly one row: the player name and dob, in that order, separated by a single space. If two players share the same date of birth, pick the one whose name comes first alphabetically.
Note: Do not hard-code the database name — your program is run against a different database instance for evaluation. The input file is in the same folder as your program.
For the database connection, use these variables:
database = sys.argv[1] # database name, from the command line
user = os.environ.get('PGUSER')
password = os.environ.get('PGPASSWORD')
host = os.environ.get('PGHOST')
port = os.environ.get('PGPORT')
The input is a file named team.txt in the same folder — A single line holding one team name (e.g. Vindhya)..
primary keyforeign keyarrow points to the referenced columndrag to pan