[Python] 간단한 CRUD 구현
from django.shortcuts import render,HttpResponse, redirect import random from django.views.decorators.csrf import csrf_exempt nextId = 4 topics = [ {'id':1, 'title':'routing', 'body':'Routing is ...'}, {'id':2, 'title':'view', 'body':'view is ...'}, {'id':3, 'title':'Model', 'body':'Model is ...'} ] def HTMLTemplate(articleTag, id=None): global topics contextUI = '' if id != None: contextUI = f'..
[Python] 5일차
# 표춘입출력 - Chapter #sep를 붙여줌으로 문자열 사이에 어떤 값을 넣어줄지 결졍 print("Python", "Java",sep=",",end="?") # end 한줄로 나오게 됨 문장의 끝부분을 물음표로 바꿔달라 # 기본으로 end 줄바꿈으로 디폴트로 되어있었따. print("무엇이 더 재밌을까요?") import sys print("Python","Java", file=sys.stdout) #표준 출력으로 문장이 찍히는 거고 print("Python","Java", file=sys.stderr) #표준 에러로 처리된다 scores = {"수학":0,"영어":50,"코딩":100} for subject, score in scores.items(): #print(subject,score) #..