Tutorials  Articles  Notifications  Login  Signup


Sign in to Publish articles, apply into jobs, participate in Hackathons.

Sign in

DG

Dhirendra Gupta

Student at BIT Mesra Aug. 15, 2020, 1:16 p.m. 786 views

Python Write File

We can use open() function to write into a file or create a new file.

open() function accepts 2 parameters …


RA

Ritu Aggrawal

Site reliability engineer at Uber Aug. 14, 2020, 11:46 a.m. 611 views

HTML How to assign an initial value to radio button as checked

To assign a values as checked to any radio button in html, we can use checked attribute.

<input type="radio …

RK

Rajan Kumar

Founder at HackersFriend Aug. 12, 2020, 1:17 p.m. 1173 views

How to separate Django application config files from code using python decouple

We have to put a lot server specific details in settings.py file of any django application, like DB username and …


RK

Rajan Kumar

Founder at HackersFriend Aug. 11, 2020, 10:10 p.m. 1581 views

How to return JSON Encoded response from Django View

From django 1.7 + we have built-in JsonResponse in Django. It sets Content-Type in http header to application/json, and converts …


DG

Dhirendra Gupta

Student at BIT Mesra Aug. 5, 2020, 10:17 a.m. 576 views

Python read file

To read contents of any file using python we need to follow following steps:

  1. Open the file using open() function …

DG

Dhirendra Gupta

Student at BIT Mesra Aug. 4, 2020, 6:37 p.m. 648 views

Python Delete file or directory

To delete a file or folder using python, we must import os. Os library provides remove() function which we can …


DG

Dhirendra Gupta

Student at BIT Mesra Aug. 4, 2020, 6:19 p.m. 636 views

Type casting in Python

There might be times when we want a variable to be certain type. It usually happens when we need to …


DG

Dhirendra Gupta

Student at BIT Mesra July 31, 2020, 12:13 p.m. 763 views

Python end parameter in print()

print() function in python prints a new line in the end by default. Sometimes we might don't want this behaviour …


HS

Harsh Shukla

Intern at Microsoft July 30, 2020, 10:31 a.m. 579 views

Python Get length of a string

To get length of a string you can use len() function of python. len() function can be used with several …


HS

Harsh Shukla

Intern at Microsoft July 30, 2020, 10:21 a.m. 644 views

Python get number of items in a list

To get number of items in a list you can use len() function of python. len() function can be …


HackerFriend Logo

Join the community of 1 Lakh+ Developers

Create a free account and get access to tutorials, jobs, hackathons, developer events and neatly written articles.


Create a free account

View more
HackerFriend Logo

Join the community of 1 Lakh+ Developers

Create a free account and get access to tutorials, jobs, hackathons, developer events and neatly written articles.


Create a free account

HackersFriend Updates




View more