Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.

learn more… | top users | synonyms (2) | python jobs

-1
votes
1answer
15 views

How do i compare the the user response with actual answer that are stored- python

This for loop will get the user multiple reponse with values from radio button with values like 1, 3, 5, 2, 1 likewise.... for i in range(1, 10): resp_i = form.getvalue('opt_%d' %i, '0') ...
0
votes
0answers
3 views

Custom attributes for Flask WTForms

I develop website on Flask and AngularJS. I need to send a form whith AJAX using AngularJS but it requires a custom attribute for input field. For example I have a form in Jinja2 template: <form ...
-3
votes
0answers
30 views

please help me with small python program

I am a beginner practicing on a python program that requires a turtle will turn around when it hits the wall. I need some advices from you. Thanks. This is my work so far. In this program I lets the ...
0
votes
0answers
7 views

Python Pandas plotting title name passing string

How do I make the title name display 'AAPL Stock Price' without converting all my pandas data to matplotlib and numpy. import time from pylab import * import pandas as pd import numpy as np import ...
1
vote
0answers
22 views

Recursive call complexity

I have some difficulty proving the complexity of these two recursive codes. I have some intuition about them. I think the first one is O(n), and the second is O(nlogn). these are the codes: def ...
2
votes
0answers
14 views

How to save form record in client side while saving data with ajax POST?

I have created one form. On click Submit button record is saving in database with ajax POST. Then again for viewing those records on web page I am clearing existing html and adding new records. In ...
0
votes
0answers
16 views

BeautifulSoup to scrape street address

I am using the code at the far bottom to get weblink, and the Masjid name. however I would like to also get denomination and street address. please help I am stuck. Currently I am getting the ...
0
votes
1answer
29 views

Python list overlapping

How would you go about overlapping lists, without the boring and time consuming for-loops? Functionality: l1=[1,2,3] l2=['a','b','c'] overlap(l1,l2) #[(1,'a'),(2,'b'),(3,'c')] overlap(l2,l1) ...
0
votes
5answers
35 views

Add http://xxx.xx/ to a string using python

How can I add "http://test.url/" to the result link.get('href') below, but only if it doesn't contain "http" import urllib2 from bs4 import BeautifulSoup url1 = ...
0
votes
3answers
22 views

From a module with errors, import valid entities

I have a module A.py, that holds some constants, and a class. The class is not ready yet, so meny of it's functions implementations are NOT IMPLEMENTED YET - that is, I want if anyone calls this ...
-1
votes
1answer
13 views

gspread TypeError: login() takes no arguments (2 given)

I have installed gspread and gdata in my virtual environment using pip. And when I try to login with email and password following the documentation, as shown: import gspread gc = ...
1
vote
1answer
22 views

Creating Non Linear Regression with Python

I have a simple data; x = numpy.array([1,2,3, 4,5,6, 7,8,9, 10,11,12, 13,14,15, 16,17,18, ...
0
votes
2answers
17 views

Strip link from website using Beautifulsoup

I have tried hard to get the link (i.e. /d/Hinchinbrook+25691+Masjid-Bilal) from "result" below while using beautifulsoup in Python. Please help? result: <div class="subtitleLink"><a ...
2
votes
2answers
21 views

What is the use of the path /usr/share/pyshared in python?

I found that some applications developed with python drop their files in this path, what is the use of this path, and what files should I put in it ?
-4
votes
1answer
40 views

How to write for this situation which is looping?

I'm a newbie to write python and programming. Please give me a solution for this case. x = '3221' y = '3222' I want to get the number on these, x and y. (e.g. '3' from x, '2' from y) And ...

15 30 50 per page