버미다

고정 헤더 영역

글 제목

메뉴 레이어

버미다

메뉴 리스트

  • 홈
  • 태그
  • 방명록
  • 분류 전체보기 (255) N
    • html, css (87) N
    • 서문 (3)
    • python (125)
    • c언어 (13)
    • gpt활용 (1)
    • pymysql (17)
    • SQLD (8)
    • 업무 (1)

검색 레이어

버미다

검색 영역

컨텐츠 검색

python

  • 다시 만들기

    2025.01.06 by bumychoi

  • 게시판 만들기 로그인까지

    2024.07.29 by bumychoi

  • 달력추가

    2024.07.26 by bumychoi

  • 복습중

    2024.07.25 by bumychoi

  • 날짜 시간 다루

    2024.07.09 by bumychoi

  • 조회하기 dict

    2024.07.09 by bumychoi

  • 타임 딜레이~~

    2024.07.09 by bumychoi

  • 응용하기

    2024.07.08 by bumychoi

다시 만들기

from flask import Flask,render_template,request,jsonify,redirectfrom pymongo import MongoClientclient = MongoClient("mongodb+srv://sparta:test@cluster0.wu64ps9.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0")db=client.d_barapp = Flask(__name__) @app.route("/",methods=["GET"])def index():    mv_list= list(db.mv.find({},{"_id":False}))    # print(mv_list)    return render_template(     ..

python 2025. 1. 6. 12:30

게시판 만들기 로그인까지

DOCTYPE html>html lang="en">head>    meta charset="UTF-8">    meta name="viewport" content="width=device-width, initial-scale=1.0">    title>{{title}}title>head>body>    script>        function search(){            const v_search = document.getElementById("search").value;            const v_keyword = document.getElementById("keyword").value;            if(v_search == "" || v_keyword== ""){      ..

python 2024. 7. 29. 14:53

달력추가

DOCTYPE html>html lang="en">head>    meta charset="UTF-8">    -->    title>투두title>    script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js">script>    style>        html,        body,        h1,        h2,        h3,        div,        span,        a,        button,        input {            margin: 0;            padding: 0;            box-sizing: content-box;        }       ..

python 2024. 7. 26. 13:25

복습중

DOCTYPE html>html lang="en">head>    meta charset="UTF-8">    -->    title>투두title>    script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js">script>    style>        html,        body,        h1,        h2,        h3,        div,        span,        a,        button,        input {            margin: 0;            padding: 0;            box-sizing: content-box;        }       ..

python 2024. 7. 25. 23:23

날짜 시간 다루

from datetime import datetime,timezonet=datetime.now()print(t)print("---------")#타임존print(datetime.now(timezone.utc))#1print(datetime.now().strftime("%Y-%m-%d %H:%m:%S"))#2print(datetime.now().strftime("%Y-%M-%D %H:%M:%S %p %A %B"))#3print(datetime.now().strftime("%A, %B %d, %Y %H:%M:%S"))print(datetime.now().strftime("%A,%B %d ,%Y %T"))#4print(datetime.now().strftime("%A, %B, %X %r"))2024-07-09..

python 2024. 7. 9. 12:16

조회하기 dict

d={"USA":36,"Germany":17,"France":32,"Australia":77,"South Africa":99,"India":108,"South Korea":200}def search_dict(word):    try:        c=dict((new_k.lower(),new_val) for new_k,new_val in d.items())        return c[word]    except:        return "헤당국가 없습니다."name=input("나라이름을 입력하세요:").lower()print(search_dict(name))#2name2=input("나라이름을 입력하세요:").lower()def search_dict1(word):    c=dict((new_k.lo..

python 2024. 7. 9. 11:28

타임 딜레이~~

import time#1for i in [0.5,1,1.5,2,2.5,3]:    time.sleep(i)   print(f"Delayed {i} seconds")#2n=0.5while True:    time.sleep(n)    print(f"Delay for {n} seconds")    n+=0.5    if n>=3.5:        break#3def sleep_out(n=1):    print(f"dalyed for {n} seconds")    time.sleep(n)for n in [0.5,1,1.5,2.5,3,3.5]:    sleep_out(n)

python 2024. 7. 9. 11:08

응용하기

import timefor i in range(1,6):    print(i)    time.sleep(1)#1 n=0while n5:    n+=1    time.sleep(1)    print(n)#2m=0while True:    m+=1    time.sleep(1)    print(m)    if m == 5:        break#3n=1while True:    time.sleep(1)    if n 5:        print(n)        n+=1        continue    break

python 2024. 7. 8. 22:54

추가 정보

인기글

최신글

페이징

이전
1 2 3 4 5 ··· 16
다음
TISTORY
버미다 © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바