| Conditions | 4 |
| Total Lines | 12 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 50 | def get_time_list(class_time): |
||
| 51 | time_list = {"1": [], "2": [], "3": [], "4": []}
|
||
| 52 | time_text = "{} ~ {}"
|
||
| 53 | for n, times in enumerate(class_time): |
||
| 54 | if n % 2 == 0: |
||
| 55 | time_list["1"].append(time_text.format(times[0], times[1])) |
||
| 56 | time_list["2"].append(time_text.format(times[0], class_time[n+1][1])) |
||
| 57 | |||
| 58 | if n < 8: |
||
| 59 | time_list["3"].append(time_text.format(times[0], class_time[n+2][1])) |
||
| 60 | time_list["4"].append(time_text.format(times[0], class_time[n+3][1])) |
||
| 61 | return time_list |
||
| 62 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.