Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: how json dump Japanese
Post: RE: how json dump Japanese

To JSON serialize Unicode or non-ASCII data as-is strings instead of \u escape sequence. The json.dump() and json.dumps() has a ensure_ascii parameter. The ensure_ascii is by-default true so the outp...
vishalhule General Coding Help 2 8,110 Mar-17-2020, 07:06 AM
    Thread: Change string into Dict
Post: RE: Change string into Dict

Just to demonstrate what you can do using Python json module. sampleObj = { "car1": { "name":"Ford", "price":35000}, "car2": { "name":"BMW", "price":65000} } str = json.dumps(sampleObj, indent=...
vishalhule General Coding Help 2 2,930 Mar-05-2020, 10:37 AM
    Thread: print python json dump onto multiple lines
Post: RE: print python json dump onto multiple lines

Note: The json.dumps() method encodes any Python object into JSON formatted String. Here when you passed dictionary to json.dumps(), it converted it into a JSON formatted string. When you want to pre...
vishalhule General Coding Help 2 19,862 Mar-02-2020, 12:47 PM
    Thread: mysql db connection using python
Post: RE: mysql db connection using python

I suggest you install MySQL Connector Python because it is official Oracle driver for MySQL for working with Python and it works with both Python 3 and Python 2. You can install connector using pip o...
vishalhule General Coding Help 13 11,997 Aug-04-2018, 09:08 AM
    Thread: Basic Python Program for Sequence
Post: RE: Basic Python Program for Sequence

Steps to Follow: Use Python input() function to accept the list as an input from a user. use for loop to iterate over a list Do your operation in the body of for loop Your code should be like this n...
vishalhule Homework 7 9,994 Jul-15-2018, 08:00 PM
    Thread: What am i doing wrong - math tool box
Post: RE: What am i doing wrong - math tool box

do indentation properly ans=True while ans: print(""" 1.Square 2.Rectangle 3.Triangle 4.Circle 5.Exit the program """) ans=input("What would you like to do?") ans ...
vishalhule Homework 9 4,912 Jun-24-2018, 04:29 AM
    Thread: difference between range in py3 and xrange in py2
Post: RE: difference between range in py3 and xrange in ...

In Python 3, they removed the original range()function and renamed xrange of python 2.x to range in python 3.x basic functionality is the same between xrange and range. Differences: Two xrange objec...
vishalhule General Coding Help 10 6,977 Jun-23-2018, 07:04 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020