Files
exercism_puzzles/python/tisbury-treasure-hunt/HINTS.md
T

2.7 KiB

Hints

General

1. Extract coordinates

  • Remember: tuples allow access via index, using brackets. Indexes start from the left at zero.

2. Format coordinates

3. Match coordinates

  • What methods could be used here for for testing membership?.
  • Check class tuple for more details on tuples.
  • Could you re-use your convert_coordinate() function?

4. Combine matched records

5. "Clean up" & make a report of all records

  • Remember: tuples are immutable, but the contents can be accessed via index using bracket notation.
  • Tuples don't have to use parentheses unless there is ambiguity.
  • Python has multiple methods of string formatting. str.format() and f-strings are two very common ones.
  • There are multiple textual formatting options available via Pythons format specification mini-language.