Skip to content

Postleitzahlengebiete in Deutschland / German Postcode Areas

Notifications You must be signed in to change notification settings

BenutzerEinsZweiDrei/plz_name_bundesland

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

get bundesland like

import json

# Load the JSON data from a file
with open('plz_ready.json', 'r') as file:
    data = json.load(file)

def get_bundesland(data, plz):
    for entry in data:
        if entry["postcode"] == plz:
            return entry["bundesland"]
    return None  # Return None if no matching postcode is found

# example
plz = "01067"
bl = get_bundesland(data, plz)
print(bl)

About

Postleitzahlengebiete in Deutschland / German Postcode Areas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published