{"id":13523866,"url":"https://github.com/sigmavirus24/python-interview-questions","last_synced_at":"2025-04-01T01:33:39.170Z","repository":{"id":19647405,"uuid":"22899911","full_name":"sigmavirus24/python-interview-questions","owner":"sigmavirus24","description":"A listing of questions that could potentially be asked for a python job listing","archived":true,"fork":false,"pushed_at":"2015-06-10T11:07:36.000Z","size":194,"stargazers_count":189,"open_issues_count":1,"forks_count":58,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-01-24T04:14:59.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigmavirus24.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T02:32:38.000Z","updated_at":"2024-01-24T04:14:59.416Z","dependencies_parsed_at":"2022-08-24T04:50:40.729Z","dependency_job_id":null,"html_url":"https://github.com/sigmavirus24/python-interview-questions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigmavirus24%2Fpython-interview-questions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigmavirus24%2Fpython-interview-questions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigmavirus24%2Fpython-interview-questions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigmavirus24%2Fpython-interview-questions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigmavirus24","download_url":"https://codeload.github.com/sigmavirus24/python-interview-questions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246567390,"owners_count":20798164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:04.591Z","updated_at":"2025-04-01T01:33:34.155Z","avatar_url":"https://github.com/sigmavirus24.png","language":null,"readme":"# Python Interview Questions\n\nThis repository contains a number of Python interview questions that can be \nused when vetting potential candidates. It is not advised to use every one of \nthese questions for the same candidate.\n\n## Descriptive/Vocabulary Questions\n\n1. What is Python?\n\n1. Describe some features of Python.\n\n1. How does Python execute code?\n\n1. What are some built-in types in Python?\n\n1. What are bindings, i.e., what does it mean for a value to be bound to a\n   variable?\n\n## Usage Questions\n\n1. How do you create a list?\n\n1. How do you create a dictionary?\n\n1. What is a list comprehension? Why would you use one?\n\n1. What is a generator? What can it be used for?\n\n1. What is inheritance? \n\n1. What happens if you have an error in an __init__ statement? \n\n1. What happens in python if you try to divide by zero?\n\n1. How can you improve the following code?\n\n   ```python\n   import string\n\n   i = 0\n   for letter in string.letters:\n       print(\"The letter at index %i is %s\" % (i, letter))\n       i = i + 1\n   ```\n\n   Bonus points for mentioning `enumerate` and use of `str.format`.\n\n1. How can you return multiple values from a function/method?\n\n## Strategic Questions\n\n1. What's the fastest way to swap the values bound to two variables?\n\n1. What is the importance of reference counting?\n\n1. Do functions (or methods) return something even if there isn't a `return`\n   statement? If so, what do they return?\n\n1. How do you reverse a list? Can you come up with at least three ways? \n\n1. How would you merge two sorted lists? They can be any length, or empty. \n\n1. How would you count the lines in a file? How would you do it if the file was too big to hold in memory?\n\n\n\n\n\n","funding_links":[],"categories":["Programming Languages/Frameworks/Platforms","学习资源"],"sub_categories":["Python","Python资源"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigmavirus24%2Fpython-interview-questions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigmavirus24%2Fpython-interview-questions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigmavirus24%2Fpython-interview-questions/lists"}