Fix typos

This commit is contained in:
Isabelle Viktoria Maciohsek
2021-01-07 23:30:28 +02:00
parent be5357b291
commit 6169dda836
5 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ tags: list,beginner
Checks if all the values in a list are unique.
- Use `set()` on the given list to keep only unique occurences.
- Use `set()` on the given list to keep only unique occurrences.
- Use `len()` to compare the length of the unique values to the original list.
```py

View File

@ -5,7 +5,7 @@ tags: date,intermediate
Creates a list of dates between `start` (inclusive) and `end` (not inclusive).
- Use `datetime.timedelta.days` to get the days betwen `start` and `end`.
- Use `datetime.timedelta.days` to get the days between `start` and `end`.
- Use `int()` to convert the result to an integer and `range()` to iterate over each day.
- Use a list comprehension and `datetime.timedelta()` to create a list of `datetime.date` objects.
@ -19,6 +19,6 @@ def daterange(start, end):
```py
from datetime import date
daterange(date(2020, 10, 1), date(2020, 10, 5))
daterange(date(2020, 10, 1), date(2020, 10, 5))
# [date(2020, 10, 1), date(2020, 10, 2), date(2020, 10, 3), date(2020, 10, 4)]
```

View File

@ -3,7 +3,7 @@ title: from_iso_date
tags: date,intermediate
---
Converts a date from its ISO-8601 represenation.
Converts a date from its ISO-8601 representation.
- Use `datetime.datetime.fromisoformat()` to convert the given ISO-8601 date to a `datetime.datetime` object.

View File

@ -5,7 +5,7 @@ tags: list,intermediate
Checks if the elements of the first list are contained in the second one regardless of order.
- Use `count()` to check if any value in `a` has more occurences than it has in `b`.
- Use `count()` to check if any value in `a` has more occurrences than it has in `b`.
- Return `False` if any such value is found, `True` otherwise.
```py

View File

@ -3,7 +3,7 @@ title: to_iso_date
tags: date,intermediate
---
Converts a date to its ISO-8601 represenation.
Converts a date to its ISO-8601 representation.
- Use `datetime.datetime.isoformat()` to convert the given `datetime.datetime` object to an ISO-8601 date.