• This repository has been archived on 03/Nov/2020
  • Stars
    star
    212
  • Rank 186,122 (Top 4 %)
  • Language
  • Created over 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A listing of questions that could potentially be asked for a python job listing

Python Interview Questions

This repository contains a number of Python interview questions that can be used when vetting potential candidates. It is not advised to use every one of these questions for the same candidate.

Descriptive/Vocabulary Questions

  1. What is Python?

  2. Describe some features of Python.

  3. How does Python execute code?

  4. What are some built-in types in Python?

  5. What are bindings, i.e., what does it mean for a value to be bound to a variable?

Usage Questions

  1. How do you create a list?

  2. How do you create a dictionary?

  3. What is a list comprehension? Why would you use one?

  4. What is a generator? What can it be used for?

  5. What is inheritance?

  6. What happens if you have an error in an init statement?

  7. What happens in python if you try to divide by zero?

  8. How can you improve the following code?

    import string
    
    i = 0
    for letter in string.letters:
        print("The letter at index %i is %s" % (i, letter))
        i = i + 1

    Bonus points for mentioning enumerate and use of str.format.

  9. How can you return multiple values from a function/method?

Strategic Questions

  1. What's the fastest way to swap the values bound to two variables?

  2. What is the importance of reference counting?

  3. Do functions (or methods) return something even if there isn't a return statement? If so, what do they return?

  4. How do you reverse a list? Can you come up with at least three ways?

  5. How would you merge two sorted lists? They can be any length, or empty.

  6. How would you count the lines in a file? How would you do it if the file was too big to hold in memory?

More Repositories

1

github3.py

Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.
Python
1,205
star
2

rush

Modular, way of implementing rate-limiting in python with a few handy default implementations
Python
57
star
3

Todo.txt-python

Python port of Gina Trapani's popular todo.txt-cli project
Python
45
star
4

github-cli

Command-line access to GitHub via the API (v3)
Python
20
star
5

gobayeux

Implementation of Bayeux protocol from CometD for Go
Go
9
star
6

sprunge.py

A small python script to post files to http://sprunge.us
Python
7
star
7

yubikiller

A tool to invalidate accidental Yubikey presses
Go
7
star
8

x11-ssh-askpass

Mirror of the original project whose site disappeared for a while there and has come back.
C
6
star
9

coviddateutil

Python
5
star
10

circuitry

Distributed Circuit Breaker pattern for Go
Go
5
star
11

subscribed

Tiny flask app that uses the GitHub API to display the watchers of a repository.
Python
4
star
12

curryer

Haskell style currying for python callables (python 3.3+ only)
Python
4
star
13

issues.py

Python script which monitors GitHub issues for specified user(s)/project(s)
Python
3
star
14

schema-validator

Proof of concept for OpenStack ansible deployment
Python
3
star
15

moreos

Python
3
star
16

No_Agenda_Bat_Sig

Linux bat signal for the No Agenda Show (www.NoAgendaShow.com)
C
3
star
17

c_libs

A collection of small, versatile and well-tested libraries for C
C
3
star
18

recipes

Python recipes
Python
2
star
19

bearded-octo-tribble

Proof of Concept of integrating OpenVAS reports into OpenStack Horizon
JavaScript
2
star
20

furry-potato

Project codename furry-potato gives you insight into other packages
Python
2
star
21

openstack-ansible-k8s

Minimal Ansible role for deploying Kubernetes alongside OpenStack Ansible
2
star
22

requests.rb

A port of Kenneth Reitz's requests to Ruby
Ruby
2
star
23

update_firefox

Simple bash script to update firefox for you on Slackware 13.x
Shell
2
star
24

houndci-python

Python review service
Python
1
star
25

salesforceid

Golang library for interacting with and validating Salesforce Identifiers
Go
1
star
26

coviddate.rs

Rust
1
star
27

waffle

1
star
28

openstack-ansible-barbican

Proof of concept role to deploy OpenStack Barbican with OpenStack Ansible
1
star
29

collaborator-guidelines

Some guidelines that folks can use to onboard Core Collaborators
1
star
30

openstack-ansible-magnum

Role to deploy Magnum with OpenStack Ansible
1
star
31

reimagined-funicular

Python
1
star
32

openstack-ansible-searchlight

An Ansible Galaxy role for deploying OpenStack's Searchlight service with OpenStack Ansible
1
star
33

wmii

Automatically exported from code.google.com/p/wmii (backup copy only)
C
1
star
34

madison_geojson

GeoJSON data converted from City of Madison's data
1
star
35

rfc3986.rs

A just-for-fun implementation of RFC 3986 in Rust
Rust
1
star
36

requests-data-schemes

Python
1
star
37

mock_github_api

A mock GitHub API written to test github3.py against
Python
1
star
38

macrocalc

Macronutrient Caclulator written in Go
Go
1
star
39

random-cometd-data

A server to generate some random data for a test cometd server
Java
1
star
40

polynomials.py

Small project for fun, updates as I want to do them
Python
1
star
41

format-geojson.clj

Clojure
1
star
42

wmii.libixp

Automatically exported from code.google.com/p/wmii.libixp
C
1
star
43

readsapi

Python
1
star