Files
test/main.py

50 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from colorama import Fore, Style, init
# Команды для запуска отладочного сервера
# noutenv\scripts\activate
# cd retraining
# python manage.py runserver
# Создать миграции
# python manage.py makemigrations
# Применить миграции
# python manage.py migrate
# запуск командной строки
# python manage.py shell
#
# Выборка: используем расширения:
# Чувствительный к регистру тест сдерживания.
# Stutents.objects.filter(name__contains = 'а')
# Нечувствительное к регистру .
# Stutents.objects.filter(name__icontains = 'а')
from datetime import datetime
init(autoreset=True)
a = [1, 2, 3, 4, 5, 6]
b = [2, 3, 4, 5, 6, 7]
q = '0 10 20 30 40'
# q_i = list(q.split(' '))
q_i = list(map(int, q.split()))
print(q_i[1] + q_i[2])
print(fr'{datetime.now():%d-%Y}')
uniq = [1,2,3,4,5]
fifa = ['a','b','c','d','e']
uniq_and_fifa = dict(zip(uniq, fifa))
print(uniq_and_fifa)
print('hello world')
# c =
print(a[:1])
# C:\Users\ackng\YandexDisk\ACKWork\django\retraining\noutenv\Scripts\activate.bat
print(f'{datetime.now():%y%m%d}')