Code Room
Code reviewMedium
Question
Review this Python code that puts a token in a URL.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
import base64, json def make_token(payload: dict) -> str: raw = json.dumps(payload).encode('utf-8') return base64.b64encode(raw).decode('ascii') def read_token(token: str) -> dict: raw = base64.b64decode(token) return json.loads(raw)Run or narrate your approach, then ask the coach.