#! /usr/bin/env python3

mydict = {'hostname': 'notebook14',
          'address': '192.168.1.214',
          'maker': 'Lenovo',
          'type': 'T530',
          'ramsize': 16,
          'ssd': True,
          }

if 'maker' in mydict:
    print("Key maker wird verwendet")

if 'maker' in mydict and 'type' in mydict:
    if mydict['maker'] == 'Lenovo' and mydict['type'].startswith('T'):
        print("Thinkpad gefunden")

if 'maker' in mydict and 'type' in mydict and \
    mydict['maker'] == 'Lenovo' and \
    mydict['type'].startswith('T'):
        print("Thinkpad gefunden")

if 'maker' in mydict and mydict['maker'] == 'Lenovo' and \
    'type' in mydict and mydict['type'].startswith('T'):
        print("Thinkpad gefunden")

if ('maker' in mydict and mydict['maker'] == 'Lenovo' and
    'type' in mydict and mydict['type'].startswith('T')):
        print("Thinkpad gefunden")
