What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-17 15:00:06
convert all sizes to terabytes pandas
def convertFloatToDecimal(f=0.0, precision=2): ''' Convert a float to string of decimal. precision: by default 2. If no arg provided, return "0.00". ''' return ("%." + str(precision) + "f") % f def fo... Add solution -
Python 2022-03-09 09:05:05
python flask get user input
Unless you want to do something more complicated, feeding data from a HTML form into Flask is pretty easy. Create a view that accepts a POST request (my_form_post). Access the form elements in the dictionary request.form. templates/my-form.html: <for... Add solution -
Python 2022-02-03 13:56:12
how to get value from txtbox in flask
from flask import Flask, request, render_template app = Flask(__name__) @app.route('/') def my_form(): return render_template('my-form.html') @app.route('/', methods=['POST']) def my_form_post(): text = request.form['text'] processed_text =... Add solution -
Python 2022-02-02 21:01:16
initials of a name in python
Raw_name = input("\nEnter Full Name : ") name = Raw_name.strip() bname = name.split(' ') lenofstr = len(bname) fname = bname[0] leofstrstr = str(lenofstr) vlname = int(lenofstr) - 1 lname = bname[int(vlname)] print("\nHi,"+bname[0]) ... Add solution -
Python 2022-01-30 19:31:20
how to convert dollars to rupees and rs to dollar in python
print('hello welcome to converter of rs to dollar and dollar to rs') print() carry_on = True while carry_on: try: ask = int(input('write what do you want to do find? for finding dollar to rs type "1" or to find rs to dollar write... Add solution
Best helpers
Ranking is empty