Básicos del Lenguaje

1

Guía de instalación y conceptos básicos

2

Archivos y slides del curso práctico de Python

3

IMPORTANTE: Instalando Ubuntu Bash en Windows para facilitarte el seguimiento del curso desde Windows.

4

¿Qué es la programación?

5

¿Por qué programar con Python?

6

Operadores matemáticos

7

Variables y expresiones

8

Presentación del proyecto

9

Funciones

10

Usando funciones en nuestro proyecto

11

Operadores lógicos

12

Estructuras condicionales

Uso de strings y ciclos

13

Strings en Python

14

Operaciones con Strings en Python

15

Operaciones con strings y el comando Update

16

Operaciones con strings y el comando Delete

17

Operaciones con strings: Slices en python

18

For loops

19

While loops

20

Iterators and generators

Estructuras de Datos

21

Uso de listas

22

Operaciones con listas

23

Agregando listas a nuestro proyecto

24

Diccionarios

25

Agregando diccionarios a nuestro proyecto

26

Tuplas y conjuntos

27

Tuplas y conjuntos en código

28

Introducción al módulo collections

29

Python comprehensions

30

Búsquedas binarias

31

Continuando con las Búsquedas Binarias

32

Manipulación de archivos en Python 3

Uso de objetos y módulos

33

Decoradores

34

Decoradores en Python

35

¿Qué es la programación orientada a objetos?

36

Programación orientada a objetos en Python

37

Scopes and namespaces

38

Introducción a Click

39

Definición a la API pública

40

Clients

41

Servicios: Lógica de negocio de nuestra aplicación

42

Interface de create: Comunicación entre servicios y el cliente

43

Actualización de cliente

44

Interface de actualización

45

Manejo de errores y jerarquía de errores en Python

46

Context managers

Python en el mundo real

47

Aplicaciones de Python en el mundo real

Conclusiones finales

48

Python 2 vs 3 (Conclusiones)

Clases bonus

49

Entorno Virtual en Python y su importancia: Python en el mundo real

No tienes acceso a esta clase

¡Continúa aprendiendo! Únete y comienza a potenciar tu carrera

Agregando diccionarios a nuestro proyecto

25/49
Recursos

Agregaremos la reciente Estructura de Datos aprendida a nuestro proyecto de PlatziVentas, en este caso Diccionarios.

Aportes 197

Preguntas 18

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad?

Mi versión del código

import sys


clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Sofware Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
]

def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in client\'s list')

def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))


def ingress_client_data(): 
    client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position')
    }
    return client


def update_client(client_id, updated_client):
    global clients

    if len(clients) -1 >= client_id:                
        clients[client_id] = updated_client
    else:
        print('Client is not in clients list')


def delete_client(client_name):
    global clients

    if client_name in clients:
        clients.remove(client_name)
    else:
        print('Client is not in clients list')


def search_client(client_name):
    for client in clients:
        if client != client_name:
            continue
        else:
            return True


def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would yo like to do today?')
    print('[C]reated client')
    print('[U]pdate client')
    print('[L]ist clients')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}? '.format(field_name))

    return field


if __name__ == '__main__':
    _print_welcome()

    command = input()
    command = command.upper()

    if command == 'C':
        client = ingress_client_data()
        create_client(client)
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()
    elif command == 'U':
        list_clients()
        client_id = int(_get_client_field('id'))
        updated_client = ingress_client_data()

        update_client(client_id, updated_client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            print('The client is in the client\'s list')
        else :
            print('The client: {} is not in client\'s list'.format(client_name))
    else:
        print('Invalid command') 
import sys

clientes = [
    {
        'name': 'Juan',
        'company': 'Maxidespensa',
        'email' : '[email protected]',
        'position' : 'Sofware Engineer'
    },
    {
        'name': 'Pedro',
        'company': 'Google',
        'email' : '[email protected]',
        'position' : 'UX Designer'
    },
]

def create_client(client_name):
    global clientes
    if client_name not in clientes:
        clientes.append(client_name)
    else:
        print('Client alredy is in client\'s list')

def list_clients():
    for idx, cliente in enumerate(clientes):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name=cliente['name'],
            company=cliente['company'],
            email=cliente['email'],
            position=cliente['position']

        ))

def update_client_search(client_name):
    global clientes
    indice = 0
    for idx in clientes:
        indice += 1
        for values in idx.values():
            if client_name == values:
                return indice - 1

def update_client(client_name, update_people):
    global clientes
    indice =  int(update_client_search(client_name))
    clientes [indice] = update_people

def searh_client(name):
    global clientes
    for idx in clientes:
        for persona in idx.values():
            if name == persona:
                return True
            else:
                False

def delete_client(client_name):
    global clientes
    if client_name in clientes:
        clientes.remove(client_name)
    else:
        print('Not Found Client')

def _print_welcome():
    print('Welcome To Platzi Ventas')
    print('*' * 50)
    print('What would yo like to day')
    print('[L]ist clients')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {}?'.format(field_name))
    return field

def _get_client_name():
    client_name = None
    while not client_name:
        client_name = input('What is the client name? ')
        if client_name == 'exit':
            client_name = None
            break
    if not client_name:
        sys.exit()
    return client_name

if __name__ == "__main__":
    _print_welcome()

    commad = input()
    commad = commad.upper()
    if commad == 'C':
        client_name = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
        create_client(client_name)
        list_clients()
    elif commad == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()

    elif commad == 'U':
        client_name = _get_client_name()
        found = searh_client(client_name)
        if found:
            update_client_name = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
            update_client(client_name,update_client_name)
            list_clients()
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))

    elif commad == "S":
        client_name = _get_client_name()
        found = searh_client(client_name)
        if found:
            print("The client is in the list client\'s")
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))

    elif commad == 'L':
        list_clients()
    else:
        print('Command Invalid')```

¡Hola! El código de esta clase me generó varios conflictos porque estoy usando otras anotaciones y tengo algunas cositas añaditas mías, tuve más de 10 errores distintos al final de la clase, me llegó el pensamiento de ¿Y si esto no es para mí? Pero escuché la voz de Freddy diciendo “Lo que hacemos es dividir un gran problemas en problemas más pequeños”, luego de esa frase, logré encontrar rápidamente cada uno de los errores, así que si tú, estás cuestionando si deberías de seguir o no, quiero decirte que sí, sí puedes lograr lo que quieres, puedes cambiar ese empleo mal pago y que no te gusta, puedes crear ese emprendimiento en tecnología y puedes todavía mucho más, recuerda, un gran problema lo divides en pequeños problemas, yo creo en ti desconocid@.

Hay un detalle interesante en la función delete_client(client_id), esto es al tener activado el pylint, ya que me marca que la variable client (dentro del for) no se usa en ningún momento. La corrección, después de haber leído cómo resolverlo es la siguiente:

Esta es la versión con el error de pylint W0612:

def delete_client(client_id):
    global clients

    for idx, client in enumerate(clients): # pylint retorna un error W0612 Unnused variable
        if idx == client_id:
            del clients[idx]
            break

Esta es la versión corregida:

def delete_client(client_id):
    global clients

    for idx, dummy_client in enumerate(clients):
        if idx == client_id:
            del clients[idx]
            break

Según lo leído aquí, es necesario que a las variables que (por alguna razón) no se van a usar, se les anteceda con dummy (o _, aunque esta opción es la menos recomendada por las confusiones que pueda ocasionar por los identificadores semi-privados) en el nombre, y de este modo Python la reconoce como una variable que puede no utilizarse.

Saludos 👋

Reto cumplido

Funciones Auxiliares

def _get_index(client_name):
    global clients

    for idx, client in enumerate(clients):
        print(idx)
        if client['name'] == client_name:
            return idx

Funciones Principales

def update_client(updated_client_fields, index):
    global clients

    if index is not None:
        clients[index].update(updated_client_fields)
    else:
        _message_to(client_name, False)

Llamados

if __name__ == '__main__':
    _print_welcome()

    command = input().upper()


    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'job': _get_client_field('job'),
        }
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'U':
        client_name = input('Who do you want to update?: ')
        updated_client_fields = _set_update_fields()
        index = _get_index(client_name)
        update_client(updated_client_fields, index)
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        index = _get_index(client_name)
        delete_client(client_name, index)
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            _message_to(client_name, True)
        else:
            _message_to(client_name, False)
    else:
        print('Invalid command')

¿Queréis que todos los valores de cada cliente empiecen por mayúscula?:

# Capitalize all the values of every client
for i in range(len(clients)):
    clients[i] = {k: v.capitalize() for k,v in clients[i].items()}

Incluirlo al inicio de list_clients() (después de global clients)

Tarea

import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Sofware Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
]

def create_client(client):

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'
        .format(uid=idx, 
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position']))


def update_client(client_name):
    client = search_client(client_name)
    if client:
        print('****Udate to client*****')

        index = clients.index(client)
        clients[index] = _get_client_info()
    else:
        _no_clients_list()


def delete_client(client_name):
    client = search_client(client_name)
    if client:
        clients.remove(client)
    else:
        _no_clients_list()


def search_client(client_name):
    
    for client in clients:
        if client['name'].capitalize() != client_name.capitalize():
            continue
        else:
            return client
    
    return {}

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)#imprimir 50 beces el asterisco
    print('What would you like to do doday?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None
    
    while not field:
        field = input('What is the client {}?'.format(field_name))

    return field
    

def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('What is the client name? ')

        if client_name == 'exit':
            client_name = None
            break
        
    if not client_name:
        sys.exit()
        
    return client_name


def _get_client_info():
    return {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position')
    }


def _no_clients_list():
    return print('Client is not in client\'s list')

if __name__ == '__main__':
    _print_welcome()

    command = input()
    command = command.upper()

    if command == 'C':
        client = _get_client_info()

        create_client(client)
        list_clients()
    elif command == 'D':
        client_name = _get_client_field("name")               

        delete_client(client_name)
        list_clients()
        pass
    elif command == 'U':
        client_name = _get_client_field("name")

        update_client(client_name)
        list_clients()
        pass
    elif command == 'S':
        client_name = _get_client_field("name")
        client = search_client(client_name)

        if client:
            print('The client: {} is in the client\'s list'.format(client_name))
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))

        list_clients()
        pass
    else:
        print('Invalid command')

    

Quizá fui un tanto redundante, pero lo sentí legible, aquí mi código y pues regalenme un like, si les agradó la solución.

import sys
clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position':'Software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position':'Data engineer',
    }
]

def create_client(client):
    global clients #global permite jalar las variables globales del scoop

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))


def delete_client(client_name):
    for i in range(0, len(clients)):
        if client_name == clients[i]['name']:
            clients.remove(clients[i])
            break
        else:
            print('Client is not in clients list')


def update_client(client_name, updated_name, updated_data):
    for i in range(0, len(clients)):
        if client_name == clients[i]['name']:
            clients[i] = updated_data

    else:
        print('Client is not in clients list')


def search_client(client_name):
    for i in range(0, len(clients)):
        if client_name != clients[i]['name']:
            continue
        else:
            return True


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}? '.format(field_name))

    return field


def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('Whats is the client name? ')

        if client_name == 'exit':
            client_name = None
            break

    if not client_name:
        sys.exit()

    return client_name

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[L]ist client')
    print('[D]elete client')
    print('[U]pdate client')
    print('[S]earch client')

if __name__ == '__main__':
    _print_welcome()

    command = input()
    command = command.upper()

    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
            }
        create_client(client)
        list_clients()

    elif command == 'L':
        list_clients()

    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()

    elif command == 'U':
        client_name = _get_client_name()
        updated_name = input('What is the updated client name?: ')

        updated_data = {
            'name': updated_name,
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
            }


        update_client(client_name, updated_name, updated_data)
        list_clients()

    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in the client\'s list'.format(client_name))

    else:
        print('invalid comand')

Mi codigo, le añadi un retoque a la funcipon Delete, para evitar errores, haciendo que el usuario confirme la eliminación

import sys

clients = [
    {
        'name' : 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position' : 'Sofware engineer'
    },
    {
        'name' : 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position' : 'Data engineer'
    }
]

def _get_client_field(field_name):
    field = None

    while not field:
        field = input(f'What is the client {field_name}?  ')

    return field

def create_client(client_name):
    global clients

    if client_name not in clients:
        clients.append(client_name)
    else: 
        print('Client already is in the client\'s list')

def update_client(update_client_name, client_name):
    global clients
    for client in clients:
        if updated_client_name in client['name']:
            name = client_name
            company = _get_client_field('company')
            email = _get_client_field('email')
            position = _get_client_field('position')
            client.update({'name' : name, 'company' :company, 'email': email, 'position': position})
        else:
            print('Client is not in clients list')

def delete_client(client_name):
    for client in clients:
        if client_name == client['name']:
            command = input(f'Are you sure you want to eliminate {client_name}?(Y/n) ')
            if command == 'Y':
                clients.remove(client)
            else:
                sys.exit()
        else:
            print('Client is not in clients list')


def seach_client(client_name):
    for client in clients:
        if client_name == client['name']:
            return True
    return False


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client ['position']
        ))

def _print_welcome():
    print('WELCOME TO QUEIS VENTAS')
    print('*' * 5)
    print('What wouls you like to do today?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


if __name__ == '__main__':
    _print_welcome()

    command = input().upper()

    
    if command == 'C':
        client = {
            'name' : _get_client_field('name'),
            'company' : _get_client_field('company'), 
            'email' : _get_client_field('email'), 
            'position' : _get_client_field('position'), 
        }
        create_client(client)
        list_clients()
    elif command == 'D':
        client_name = _get_client_field('[D]eleted')

        delete_client(client_name)
        list_clients()
    elif command == 'U':
        updated_client_name = _get_client_field('to [U]pdate')
        client_name = _get_client_field('new')

        update_client(updated_client_name, client_name)
        list_clients()
    elif command == 'S':
        client_name = _get_client_field('[S]earch')
        found = seach_client(client_name)

        if found:
            print('The client is in the clien\'s list')
        else:
            print(f'The client: {client_name} is not in out client\'s list')

    else:
        print('Invalid Command')

Mi verisón de las funciones UPDATE, DELETE y SEARCH:
UPDATE:

def update_client(client_name):
    state = 0
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            a = '''Choose a number to define which field you will update:
            1) All of them
            2) Name
            3) Company
            4) Email
            5) Position
            : '''
            ask = int(input(a))

            if ask == 1:
                all_them = {
                    'name': _get_client_field('name'),
                    'company': _get_client_field('company'),
                    'email': _get_client_field('email'),
                    'position': _get_client_field('position'),
                }
                clients[idx] = all_them
            elif ask == 2:
                name = _get_client_field('name')
                clients[idx]['name'] = name
            elif ask == 3:
                company = _get_client_field('company')
                clients[idx]['company'] = company
            elif ask == 4:
                email = _get_client_field('email')
                clients[idx]['email'] = email
            elif ask == 5:
                position = _get_client_field('position')
                clients[idx]['position'] = position
        else:
            state = 1
    if state == 1:
        print('Client is not in clients list')

DELETE

def delete_client(client_name):
    state = 0
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            del clients[idx]
        else:
            state = len(clients)

    if state == len(clients):
        print('Client is not in clients list')

SEARCH:

 def search_client(client_name):
    for idx, client in enumerate(clients):
        if client_name != client['name']:
            continue
        else:
            return True

Solucion al reto, aunque en el Update no solo se actualizo el nombre sino toda la informacion

def update_client(client_name, updated_client):
  global clients
  for key, client in enumerate(clients):
    if client["name"] == client_name:
      clients[key] = updated_client
      break
  else:
    print("Client is not in the client's list")

def delete_client(client_name):
  global clients
  for key, client in enumerate(clients):
    if client["name"] == client_name:
      del clients[key]
      break
  else:
    print("Client is not in the client's list")

def search_client(client_name):
  for client in clients:
    if client['name'] == client_name:
      return True
  return False

# Actualizacion
client_name = _get_client_name()
    
    client = {
      "name": _get_client_field("name", is_new=True),
      "company": _get_client_field("company", is_new=True),
      "email": _get_client_field("email", is_new=True),
      "position": _get_client_field("position", is_new=True)
    }

    update_client(client_name, client)

import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'software engineer'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'data engineer'
    }
]

def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            position=client['position']
        ))


def print_welcome():
    print('Welcome to platzi sales')
    print('*' * 50)
    print('What would you like doing today?')
    print('[C]reate client: ')
    print('[L]ist clients: ')
    print('[U]pdate client')
    print('[D]elete client: ')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}: ?'.format(field_name))

        return field
        


def _get_client_name():
    client_name = None
    while not client_name:
        client_name = input('What is the client name? :')

        if client_name == 'exit':
            client_name = None
            break
    
    if not client_name:
        sys.exit()

    return client_name


def _get_message(kind_of_message):
    if kind_of_message == 'refuse' :
        return print('Client is not in clients list')
    elif kind_of_message == 'isInList':
        return print('This client name  is in the client list')
    elif kind_of_message == 'success':
        return print('success')

def update_client(client_name):
    global clients

    for client in clients:
        if client['name'] == client_name:
            index = clients.index(client)
            client = _get_client_object()

            clients[index] = client

def _delete_client(client_name):
    global clients

    for client in clients:
        if client['name'] == client_name:
            index = clients.index(client)
            clients.pop(index)
            _get_message('success')
            break
        else:
            _get_message('refuse')


def search_client(client_name):
    global clients
    for client in clients:
        if client['name'] != client_name:
            continue
        else:
            return True


def _get_client_object():
    client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position')
        }
    return client



if __name__ == '__main__':
    print_welcome()

    command = input().upper()

    if command == 'C':
        client = _get_client_object()
        
        # client_name = _get_client_name()
        create_client(client)
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        _delete_client(client_name)
        list_clients()

    elif command == 'U':
        client_name = _get_client_name()
        update_client(client_name)

        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found: 
            _get_message('isInList')
        else:
            print('The client {} is not our client\'s list'.format(client_name))

    else:
        print('Invalid comman')

<code>
import sys
#variable global
clients=[
    {
        'name': 'pablo',
        'company': 'google',
        'email': '[email protected]',
        'position': 'software engineer'
    },
    {
        'name': 'ricardo',
        'company': 'facebook',
        'email': '[email protected]',
        'position': 'data engineer'
    }
]



#crear cliente
def create_client(client_name):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('client already is in client\'s list')



#Listar clintes
def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
        uid=idx,
        name = client['name'],
        company=client['company'],
        email=client['email'],
        position=client['position']
        ))



#optiene el campo del cliente
def _get_client_field(field_name):
    field = None

    while not field:
        field = input('what is the client {}?'.format(field_name))

    return field



#devuelve el indice del cliente
def _get_index_client():
    client_name=None
    client_index=None

    while not client_name:
        client_name=str(input('what is the client name? =>'))
        if client_name == 'exit':
            client_name=None
            break
    if not client_name:
        sys.exit()

    for idx, client in enumerate(clients):
        if client['name'] == client_name:
            client_index=idx

    return client_index



#recoge la opcion de update client
def _get_option():
    option=None
    while not option:
        option=str(input('=> ')).upper()
        if option == 'exit':
            option=None
            break
        elif option != 'N' and option != 'C' and option != 'E' and  option != 'P':
            print('Invalid command')
            option=None
    if not option:
        sys.exit()

    return option



#recoge nuevo valor
def _get_value():
    value = None
    while not value:
        value=str(input(' Enter new value => '))
        if value == 'exit':
            value=None
            break

    if not value:
        sys.exit()

    return value



#menu de opciones a actualizar
def _print_option():
    print("""Choose the option you want to modify
            [N]ame
            [C]ompany
            [E]mail
            [P]osition
            """)



#actualizar clientes
def update_client(client_index):
    global clients

    for idx, client in enumerate(clients):
        if idx == client_index:
            _print_option()
            option=_get_option()

            if option=='N':
                client['name']= _get_value()
                print('Name modified')

            elif option=='C':
                client['company']=_get_value()
                print('Company modified')

            elif option=='E':
                client['email']=_get_value()
                print('Email modified')

            elif option == 'P':
                client['position']=_get_value()
                print('Client modified')



#busca un cliente
def search_client():
    check = _get_index_client()
    return check



#borrar clientes
def delete_clients():
    global clients
    index = _get_index_client()
    if index != None:
            client=clients[index]
            print('client {} deleted'.format(client['name']))
            del clients[index]
    else:
        _get_not_client()



#muestra el menu
def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('what would you like to do today?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[L]ist   client ')
    print('[D]elete client')
    print('[S]earch client')

#evita repetir codigo
def _get_not_client():
    return print('The client  is not in our Client\'s list')



#inicio main
if __name__ == '__main__':
    _print_welcome()

    command =str(input('=> ')).upper()

    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company':_get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position')
        }
        create_client(client)
        list_clients()

    elif command =='D':
        delete_clients()
        list_clients()

    elif command =='U':
        client_index = _get_index_client()
        update_client(client_index)
        list_clients()

    elif command =='S':
        found = search_client()

        if found != None:
            print('The client is in the client\'s list')
            print(clients[found])
        else:
            _get_not_client()
    elif command == 'L':
        list_clients()

    else:
        print('Invalid command')

Bueno aqui mi codigo, espero les sirva de algo, Saludos !

import sys
clients=[
    {
        'name':'pablo',
        'company':'Google',
        'email':'[email protected]',
        'position':'Software Ingenier'
    },
    {
        'name':'Ricardo',
        'company':'Facebook',
        'email':'[email protected]',
        'position':'Data engineer'
    }

]



def _exist_client(client):
    global clients
    
    total_clientes=range(len(clients))
    for x in total_clientes:
        id=x
        if client['name'] in clients[x]['name']:
            return True,id
        else:
            continue
    return False,id


def create_client(client):
        clients.append(client)
    


def client_not_list():
    print('Client in not in clients list')


def list_clients():
    print('|id| |Name| |Company| |Email| |Position|')
    print('*'*50)
    for idx,client in enumerate(clients):
        
        print('{uid}|{name}|{company}|{email}|{position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position'] 
        )
        )


def updated_client(client_name,updated_client_name,id):
    global clients
    clients[id]['name']=updated_client_name
    clients[id]['company']=_get_client_field('company')
    clients[id]['email']=_get_client_field('email')
    clients[id]['position']=_get_client_field('position')
    


def delete_client(id):
    global clients

    clients.pop(id)

  

def search_client(client):
    global clients
    
    total_clientes=range(len(clients))
    for x in total_clientes:
        if client['name'] in clients[x]['name']:
            id=x
            return True,x
        id=x
    return False,id

def _print_welcome():
    print('Welcome To Platzi Ventas')
    print('*'*50)
    print('What would you like to do today?')
    print('(C)reate client')
    print('(L)ist')
    print('(U)pdate client')
    print('(D)elete client')
    print('(S)earch client')

def _get_client_field(field_name):
    field =None

    while not field:
        field = input('What is the client {}?'.format(field_name))
    return field


def _get_client_name():
    client_name=None

    while not client_name:
        client_name=input('What is the Client name?')
        if client_name=='exit':
            client_name=None
            break
    
    if not client_name:
            sys.exit()

    return client_name



if __name__=='__main__':
    _print_welcome()
    command =input()
    command = command.upper();
    if command=='C':
    
        client={
            'name':_get_client_name()
        }
        TrueFalse,id=_exist_client(client)
        if TrueFalse==False:    
                client['company']=_get_client_field('company')
                client['email']=_get_client_field('email')
                client['position']=_get_client_field('position')
                create_client(client)
        else:
                print('Client already in the client\'s list')

        list_clients()
    elif command=='L':
        list_clients()
    elif command=='D':
        client_name={
            'name':_get_client_name()
        }
        TrueFalse,id=_exist_client(client_name)
        if TrueFalse==True:
            delete_client(id)
        else:
            print('The client: {} is not in our client\'s list'.format(client_name['name']))

        list_clients()
    elif command=='S':

        client_name={
        	'name':_get_client_name()
        	}

        TrueFalse,id=search_client(client_name)
        
        if TrueFalse==True:
            print('The client is in the client\'s list')
            print('{uid}|{name}|{company}|{email}|{position}'.format(
            uid=id,
            name=clients[id]['name'],
            company=clients[id]['company'],
            email=clients[id]['email'],
            position=clients[id]['position'] 
        	)
        	)
        else:
            print('The client: {} is not in our client\'s list'.format(client_name['name']))
            
    elif command =='U':
        client={
            'name': _get_client_name()
        }
        TrueFalse,id=_exist_client(client)
        if TrueFalse==False:
            client_not_list()
        else:
            updated_client_name=input('What is the updated client name ?')
            updated_client(client,updated_client_name,id)
            list_clients()
    else:
        print('Invalid command')```
<code>
import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Amazon',
        'email': '[email protected]',
        'position': 'Data engineer',
    }
]


def create_client(client):
    #se mete la variable client en la funcion
    global clients
    #si el cliente no esta en la lista de clientes:
    if client not in clients:
        clients.append(client)
    
    else:
        print('Client already is in the client\'s list ')

def list_clients():
    global clients

    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position']))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

def update_client(old_data, new_data):
    global clients
    
    for client in clients:
        for key, values in client.items():
                if old_data in values:    
                    for data in new_data:
                        clients.remove(client)
                        create_client(new_data)
                        return True

                else:
                    return False


def update_procces(field, old_data, new_data):
    cmd = update_client(old_data, new_data)
    if cmd is True:
        list_clients()            
    else:
        print(f'{field} not valid')



def delete_client(client_name):
    global clients
    
    for client in clients:
        for data in dicts.values():
            if client_name in data:
                clients.remove(client)
                return True
            
    

def search_client(client_name):
    global clients

    for client in clients:
        for data in client.values():
            if client_name == data:
                return True
            

def _print_welcome():
    print('\nBienvenidos a Platzi Ventas')
    print('+' * 27)
    print('What to do doing today?')
    print('[C]reate Client')
    print('[L]ist clients')
    print('[U]pdate client')
    print('[S]earch Client')
    print('[D]elete Client\n')


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}? '.format(field_name))
    
    return field


def _get_client_field_updated(field_name):
    field = None

    while not field:
        field = input('What is the new client {}? '.format(field_name))
    
    return field



def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('What is the client name? ')
        
        if client_name.lower() == 'exit':
            client_name = None
            
    
    if not client_name:
        sys.exit()

    return client_name


if __name__ == "__main__":
    _print_welcome()

    command = input()
    if command.upper() == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }

        create_client(client)
        list_clients()
    
    elif command.upper() == 'L':
        list_clients()

    elif command.upper() == 'D':
        client_name = _get_client_name()
        deleted = delete_client(client_name)
        if deleted is True:
            print('Deleted')
            list_clients()
        else:
            print('Client is not in the client\'s list')
        
        

    elif command.upper() == 'U':
        
        old_data = _get_client_field('name')
         
        new_data = {'name': _get_client_field_updated('name'),
                    'company': _get_client_field_updated('company'),
                    'email': _get_client_field_updated('email'),
                    'position': _get_client_field_updated('position'),
        }
        field = 'name'
            
        update_procces(field, old_data, new_data)
        


    elif command.upper() == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            print('The Client is in the client\'s list')
        
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))
   
    else:
        print('Invalid command')

# -*- coding:utf-8 -*-

import sys


clients = [
	{
		'name': 'Pablo',
		'company': 'Google',
		'email': "[email protected]",
		"position": "Software engineer"
	},
	{
		'name': 'Ricardo',
		'company': 'Facebook',
		'email': '[email protected]',
		'position': 'Data engineer'
	}
]


def create_client(client):
	global clients

	if client not in clients:
		clients.append(client)
		print("The client {} has been created in our list.".format(client['name']))
		list_clients()
	else:
		print("The client {} is alredy registred.".format(client['name']))
		list_clients()


def delete_client(client_name):
	global clients
	found = None

	for idx, client in enumerate(clients):
		if client['name'] == client_name:
			clients.pop(idx)
			print("The client {} has been removed from our list.".format(client_name))
			list_clients()
			found = True
		else:
			found = False

	return found


def list_clients():
	print("This is our client list: ")
	for idx, client in enumerate(clients):
		print('{uid}: | {name} | {company} | {email} | {position} |'.format(
			uid=idx,
			name=client['name'],
			company=client['company'],
			email=client['email'],
			position=client['position']
			))
	print("*" * 50)


def search_client(client_name):
	found = None

	for idx, client in enumerate(clients):
		if client['name'] != client_name:
			found = False
			continue
		else:
			found = True
			break

	if found:
		print('The client {} is on our list, in the index {}.'.format(client_name, idx))
		list_clients()
	else:
		_not_client()

	return found


def update_client(client_name):
	found = search_client(client_name)

	if found is True:
		print("What data do you want to update? ")
		print("[N]ame?")
		print("[C]ompany?")
		print("[E]mail?")
		print("[P]osition?")
		print("*" * 50)

		field_update = input()
		field_update = field_update.upper()

		if field_update == "N":
			for idx, client in enumerate(clients):
				if client_name == client['name']:
					client['name'] = _get_client_field('name')
					list_clients()
		elif field_update == "C":
			for idx, client in enumerate(clients):
				if client_name == client['name']:
					client['company'] = _get_client_field('company')
					list_clients()
		elif field_update == "E":
			for idx, client in enumerate(clients):
				if client_name == client['name']:
					client['email'] = _get_client_field('email')
					list_clients()
		elif field_update == "P":
			for idx, client in enumerate(clients):
				if client_name == client['name']:
					client['position'] = _get_client_field('position')
					list_clients()
		else:
			print("Invalid command, try again.")

	else:
		_not_client()

	
def _print_wellcome():
	print("WELLCOME TO NEOPOLIX")
	print("*" * 50)
	print("What would you like to do today?")
	print("[C]reate Client")
	print("[D]elete Client")
	print("[L]ist Client")
	print("[S]earch Client")
	print("[U]pdate Client")
	print("*" * 50)


def _not_client():
	print("Client is Not in clients list")


def _get_client_field(field_name):
	field = None

	while not field:
		field = input('What is the client {}? '.format(field_name))

	return field


if __name__ == '__main__':
    _print_wellcome()


    command = input()
    command = command.upper()


    if command == "C":
    	client = {
    		'name': _get_client_field('name'),
    		'company': _get_client_field('company'),
    		'email': _get_client_field('email'),
    		'position': _get_client_field('position')
    	}
    	create_client(client)
    elif command == "L":
    	list_clients()
    elif command == "D":
    	client_name = _get_client_field('name')
    	delete_client(client_name)
    elif command == "U":
    	client_name = _get_client_field('name')
    	update_client(client_name)
    elif command == "S":
    	client_name = _get_client_field('name')
    	found = search_client(client_name)
    else:
    	print("Invalid command")

No se si sea la mejor solución, pero a esta llegue. ```js #El proyecto que se va a realizar, es un CRUD. #Tiene una área de lógica, área de persistencia y un área en la cuál interactuamos con el usuario, #esto lo haremos por medio de la línea de comandos. def _get_client_field(field_name): field = None while not field: field = input(f'What is the client {field_name}? ').capitalize() return field def update_client(arr): client_to_change = input("Which is the name of the client you would like to change? ").capitalize() for client in arr: if client_to_change == client['name']: client_index = arr.index(client) #Obtenemos el índice donde esta nuestro diccionario arr.pop(client_index) #Eliminamos el diccionario del array new_client = { 'name': _get_client_field('name'), 'company': _get_client_field('company'), 'email': _get_client_field('email'), 'position': _get_client_field('position'), } arr.insert(client_index, new_client) #Agregamos el cliente actualizado en la posición anterior else: print("The client is not in the list") #if client_to_change in arr: # client_index = arr.index(client_to_change) # arr.pop(client_index) # client_updated = "" #while client_updated == "" or client_updated == " ": # client_updated = input("What is the new name of the client? ").capitalize() #arr.insert(client_index, client_updated) #print(arr) #print() #else: # print("The client is not in the list") def creat_cliente(arr): client = { 'name': _get_client_field('name'), 'company': _get_client_field('company'), 'email': _get_client_field('email'), 'position': _get_client_field('position'), } if client not in arr: arr.append(client) else: print("The client is already in the list") def list_clients(arr): for idx, client in enumerate(arr): print(f'{idx}: {client["name"]}, {client["company"]}, {client["email"]}, {client["position"]}') def delete_client(arr): client_name = input("What is the client name of the cliente you want to delete? ").capitalize() for client in arr: if client_name == client['name']: arr.remove(client) print() else: print("The client is not in the list") def welcome_message(): print("WELCOME TO PLATZI VENTAS") print("*"*50) print("Press [S] to start.") def menu(): print("What would you like to do today?") print("[C]reate Client") print("[R]ead list of Clients") print("[U]pdate Client") print("[D]elete Client") print("[E]xit") def run(): clients = [ { 'name': "Pablo", 'company': "Google", 'email': "[email protected]", 'position': "Software Engineer" }, { 'name': 'Juan', 'company': 'Maxidespensa', 'email' : '[email protected]', 'position' : 'Sofware Engineer' } ] menu_activo = 0 welcome_message() user_cmd = input().capitalize() if user_cmd == "S": menu_activo = 1 while menu_activo: menu() user = input().capitalize() if user == "C": creat_cliente(clients) elif user == "R": list_clients(clients) elif user == "U": update_client(clients) elif user == "D": delete_client(clients) elif user == "E": menu_activo = 0 else: menu_activo = 0 if __name__ == '__main__': run() ```#El proyecto que se va a realizar, es un CRUD. #Tiene una área de lógica, área de persistencia y un área en la cuál interactuamos con el usuario, #esto lo haremos por medio de la línea de comandos. *def* \_get\_client\_field(*field\_name*):    field = None        while not field:        field = input(f'What is the client {*field\_name*}? ').capitalize()        return field *def* update\_client(*arr*):    client\_to\_change = input("Which is the name of the client you would like to change? ").capitalize()            for client in *arr*:        if client\_to\_change == client\['name']:            client\_index = *arr*.index(client) #Obtenemos el índice donde esta nuestro diccionario            *arr*.pop(client\_index) #Eliminamos el diccionario del array                        new\_client = {                'name': \_get\_client\_field('name'),                'company': \_get\_client\_field('company'),                'email': \_get\_client\_field('email'),                'position': \_get\_client\_field('position'),            }                        *arr*.insert(client\_index, new\_client) #Agregamos el cliente actualizado en la posición anterior         else:            print("The client is not in the list")                        #if client\_to\_change in arr:     #   client\_index = arr.index(client\_to\_change)            #  arr.pop(client\_index)              # client\_updated = ""                #while client\_updated == "" or client\_updated == " ":         #   client\_updated = input("What is the new name of the client? ").capitalize()        #arr.insert(client\_index, client\_updated)        #print(arr)        #print()        #else:                 #   print("The client is not in the list") *def* creat\_cliente(*arr*):    client = {                'name': \_get\_client\_field('name'),                'company': \_get\_client\_field('company'),                'email': \_get\_client\_field('email'),                'position': \_get\_client\_field('position'),            }        if client not in *arr*:        *arr*.append(client)    else:        print("The client is already in the list")     *def* list\_clients(*arr*):    for idx, client in <u>enumerate</u>(*arr*):        print(f'{idx}: {client\["name"]}, {client\["company"]}, {client\["email"]}, {client\["position"]}') *def* delete\_client(*arr*):    client\_name = input("What is the client name of the cliente you want to delete? ").capitalize()    for client in *arr*:        if client\_name == client\['name']:            *arr*.remove(client)        print()    else:        print("The client is not in the list") *def* welcome\_message():    print("WELCOME TO PLATZI VENTAS")    print("\*"\*50)    print("Press \[S] to start.")    *def* menu():    print("What would you like to do today?")    print("\[C]reate Client")    print("\[R]ead list of Clients")    print("\[U]pdate Client")    print("\[D]elete Client")    print("\[E]xit")    *def* run():    clients = \[        {            'name': "Pablo",            'company': "Google",            'email': "[email protected]",            'position': "Software Engineer"        },        {            'name': 'Juan',            'company': 'Maxidespensa',            'email' : '[email protected]',            'position' : 'Sofware Engineer'        }    ]        menu\_activo = 0    welcome\_message()    user\_cmd = input().capitalize()        if user\_cmd == "S":        menu\_activo = 1         while menu\_activo:        menu()        user = input().capitalize()        if user == "C":                creat\_cliente(clients)        elif user == "R":            list\_clients(clients)        elif user == "U":            update\_client(clients)        elif user == "D":            delete\_client(clients)        elif user == "E":            menu\_activo = 0        else: menu\_activo = 0 if \_\_name\_\_ == '\_\_main\_\_':    run()
No se si sea la mejor solución pero así lo hice \#El proyecto que se va a realizar, es un CRUD. #Tiene una área de lógica, área de persistencia y un área en la cuál interactuamos con el usuario, #esto lo haremos por medio de la línea de comandos. *def* \_get\_client\_field(*field\_name*):    field = None        while not field:        field = input(f'What is the client {*field\_name*}? ').capitalize()        return field *def* update\_client(*arr*):    client\_to\_change = input("Which is the name of the client you would like to change? ").capitalize()            for client in *arr*:        if client\_to\_change == client\['name']:            client\_index = *arr*.index(client) #Obtenemos el índice donde esta nuestro diccionario            *arr*.pop(client\_index) #Eliminamos el diccionario del array                        new\_client = {                'name': \_get\_client\_field('name'),                'company': \_get\_client\_field('company'),                'email': \_get\_client\_field('email'),                'position': \_get\_client\_field('position'),            }                        *arr*.insert(client\_index, new\_client) #Agregamos el cliente actualizado en la posición anterior         else:            print("The client is not in the list")                        #if client\_to\_change in arr:     #   client\_index = arr.index(client\_to\_change)            #  arr.pop(client\_index)              # client\_updated = ""                #while client\_updated == "" or client\_updated == " ":         #   client\_updated = input("What is the new name of the client? ").capitalize()        #arr.insert(client\_index, client\_updated)        #print(arr)        #print()        #else:                 #   print("The client is not in the list") *def* creat\_cliente(*arr*):    client = {                'name': \_get\_client\_field('name'),                'company': \_get\_client\_field('company'),                'email': \_get\_client\_field('email'),                'position': \_get\_client\_field('position'),            }        if client not in *arr*:        *arr*.append(client)    else:        print("The client is already in the list")     *def* list\_clients(*arr*):    for idx, client in <u>enumerate</u>(*arr*):        print(f'{idx}: {client\["name"]}, {client\["company"]}, {client\["email"]}, {client\["position"]}') *def* delete\_client(*arr*):    client\_name = input("What is the client name of the cliente you want to delete? ").capitalize()    for client in *arr*:        if client\_name == client\['name']:            *arr*.remove(client)        print()    else:        print("The client is not in the list") *def* welcome\_message():    print("WELCOME TO PLATZI VENTAS")    print("\*"\*50)    print("Press \[S] to start.")    *def* menu():    print("What would you like to do today?")    print("\[C]reate Client")    print("\[R]ead list of Clients")    print("\[U]pdate Client")    print("\[D]elete Client")    print("\[E]xit")    *def* run():    clients = \[        {            'name': "Pablo",            'company': "Google",            'email': "[email protected]",            'position': "Software Engineer"        },        {            'name': 'Juan',            'company': 'Maxidespensa',            'email' : '[email protected]',            'position' : 'Sofware Engineer'        }    ]        menu\_activo = 0    welcome\_message()    user\_cmd = input().capitalize()        if user\_cmd == "S":        menu\_activo = 1         while menu\_activo:        menu()        user = input().capitalize()        if user == "C":                creat\_cliente(clients)        elif user == "R":            list\_clients(clients)        elif user == "U":            update\_client(clients)        elif user == "D":            delete\_client(clients)        elif user == "E":            menu\_activo = 0        else: menu\_activo = 0 if \_\_name\_\_ == '\_\_main\_\_':    run()
. El reto estuvo muy HEAVY... pero al final se logró!. Al compararse con el diseño del profesor, las diferencias no son grandes, pero si me llevo casi 3hr solventar los errores. Hay una parte interesante en el bloque UPDATE, porque estoy obligado a reescribir todos los campos; pero eso será otro reto.
El reto estuvo muy HEAVY... pero al final se logró!. Al compararse con el diseño del profesor, las diferencias no son grandes, pero si me llevo casi 3hr solventar los errores. Hay una parte interesante en el bloque UPDATE, porque estoy obligado a reescribir todos los campos; pero eso será otro reto.
```js import sys #list clients clients = [ { 'name' : 'Pablo', 'company' : 'Google', 'email' : '[email protected]', 'position' : 'Software engineer' }, { 'name' : 'Ricardo', 'company' : 'Facebook', 'email' : '[email protected]', 'position' : 'QA engineer' } ] def _print_welcome(): print('Welcome to Platzi Sales') print('*'*50) print('What would you like to do today?') print('[C]reate client') print('[D]elete client') print('[U]pdate client') print('[S]earch client') def _get_client_from_user(): client = { 'name' : _get_client_field('name'), 'company' : _get_client_field('company'), 'email' : _get_client_field('email'), 'position' : _get_client_field('position') } return client def _get_client_field(field_name): field = None while not field: field = input(f'what is the client {field_name} you want to make changes?') return field def create_client(client): global clients if client not in clients: clients.append(client) else: print("Client already is in the client's list") list_clients() def _get_client_name(): client_name = None while not client_name: client_name = input('What is the client name? ') if client_name == 'exit': client_name = None break if not client_name: sys.exit() return client_name def list_clients(): for id, client in enumerate(clients): print(f'{id+1} : {client['name']} : {client['company']} : {client['email']} : {client['position']}') def update_client(): id_client = int(input(f'Which id you want to change?')) for key in clients[id_client-1]: new_value = input(f'Write the new value for {key}: ') clients[id_client-1][key] = new_value return list_clients() def delete_client(clients, client_name): for client in clients: if client['name'] == client_name: clients.remove(client) else: print("Client is not in client's list") def search_client(client_name): for client in clients: if client['name'] == client_name: continue else: return True #----------Inicio programa ------------ _print_welcome() command = input() command = command.upper() if command =='C': client = _get_client_from_user() create_client(client) elif command =='D': list_clients() client_name = _get_client_name() delete_client(clients, client_name) list_clients() elif command =='U': #client_name = _get_client_name() list_clients() update_client() elif command == 'S': client_name = _get_client_name() found = search_client(client_name) if found == True: print("The client is in the client's list") list_clients() else: print(f"The client: {client_name} is not in our client's list") else: print('Invalid command') ```

No sé qué sería de mi aprendizaje sin GPT. Que locura. Obvio dejo que me guie, tampoco que haga todo 🤣, por ejemplo no sabia porque del() no aparecía ni en la ayuda de lists ni de dict. y es porque es una built-in function jaja. Definitivamente aprendo más en los retos, solo contra el Código código 🐍🐧❤️


Aqui la parte del reto más importante:
Lo dejo listo para más adelante decirle al usuario que campo desea actualizar. Pero la del profe está muy genial, claro ya se reciben los parámetros como tal no hay que buscar nada solo validar.

Explicación Código update del profe:

The line if len(clients) - 1 >= client_id: checks if the given client_id is a valid index for the clients list. If it is, then the next line clients[client_id] = updated_client updates the information of the client at that index with the new information provided in the updated_client argument.

esta fue mi solucion para buscar un cliente

def searchclient(client_name):
global clients

filtrar = list(filter(lambda client: client['name'] == client_name, clients))
if filtrar == []: 
    print(f'client {client_name} not found')
else:
    print(filtrar)

y esta para eliminarlo

def deleteclient():
global clients

lits_clients()
delete = int(input('Enter the index of the client you want to delete -> '))
delete -= 1
clients.pop(delete) 
lits_clients()

Mi solución

"""Aplication CRUD in lists python"""
clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineer'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer  '
    },
    {
        'name': 'Luis',
        'company': 'Apple',
        'email': '[email protected]',
        'position': 'Frontend Developer'
    }
]

Create client:

def create_client(client):
    """create client"""
    global clients
    if client in clients:
        print(f'El cliente {client} ya está en la lista')
    else:
        clients.append(client)

List client:

def list_clients():
    """List clients"""
    for index, client in enumerate(clients):
        print(
            f"{index} {client['name']} {client['company']} {client['email']} {client['position']}")

Update client

def update_client(old_client, new_client):
    """Update client name"""
    global clients

    indice = None
    for index, item in enumerate(clients):

        if item['name'] == old_client:
            item['name'] = new_client
            break

    if indice is None:
        print(f'****El cliente {old_client} no está en la lista****')

Delete client

def delete_client(client):
    global clients

    indice = None
    for index, item in enumerate(clients):

        if item['name'] == client:
            indice = index
            break

    if indice is None:
        print(f'****El cliente {client} no está en la lista****')
    else:
        clients.pop(indice) 

Search client

def search_client(client):
    value = False
    for index, item in enumerate(clients):

        if item['name'] == client:
            value = True
            break
    return value

Get client:

def _get_client(key):
    client = None

    while not client:
        client = input(f'Ingrese el {key} del cliente?: ')
        if client == 'exit':
            client = None
            break
    return client

main

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 30)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[R]ead client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


if __name__ == '__main__':
    _print_welcome()

    command = input(':').upper()

    if command == 'C':

        client = {
            'name': _get_client('name'),
            'company': _get_client('company'),
            'email': _get_client('email'),
            'position': _get_client('position')
        }

        create_client(client)
        list_clients()

    elif command == 'D':
        client = _get_client('name')
        delete_client(client)
        list_clients()

    elif command == 'R':
        list_clients()

    elif command == 'U':
        client_name = _get_client('name')
        new_client_name = input('Ingresa el nuevo nombre: ')
        update_client(client_name, new_client_name)
        list_clients()

    elif command == 'S':
        client_name = _get_client('name')
        found = search_client(client_name)
        list_clients()

        if found == True:
            print(f'****El cliente {client_name} se encuentra en la lista****')
        else:
            print(
                f'****El cliente {client_name} no se encuentra en la lista****')
    else:
        print('command invalid')

esto se empieza a poner rico 😂😂😂😂

Para los que estén usando la sintaxis f-string se debe encerrar en comillas dobles o triples para que pueda funcionar.

def list_clients():
    for index, value in enumerate(clients):
        print(f"{index}: {value['name']}")

Mi versión del código

import os


#Creacion de una lista de diccionarios que da la facilidad de agregar
#   mayor cantidad detalles a cada elemento en la lista
clients = [
    {
        'name' : 'Pablo',
        'Company' : 'Google',
        'email' : '[email protected]',
        'position' : 'Software engineer',
    },

    {
        'name' : 'Ricardo',
        'Company' : 'Faceboo',
        'email' : '[email protected]',
        'position' : 'DB engineer',    
    }

]



def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What\'s the client\'s {}?: '.format(field_name))
    return field



def _create_obj(_option):
    if _option == 1:
        client = {
                'name': _get_client_field('name').capitalize(),
                'Company' : _get_client_field('Company').capitalize(),
                'email' : _get_client_field('email'),
                'position' : _get_client_field('position').capitalize(),
            }
    else:
        client = {
            'name': _get_client_field('name').capitalize(),
        }
    return client



#This function is used to loop through the list easily
def _conversor_lists(client_d, aux):
    global clients
    num = int(len(clients))
    mlist = []
    pivot = []
    if client_d != None: 
        for idx in range(num):
            for content in clients[idx].values():
                mlist.append(content)
        for cont in client_d.values():
            pivot.append(cont)
        if aux == 0:
            return mlist #Full list
        else:
            return pivot # A small list with a name to search
    else:
        return None



def create_client(client):
    os.system("cls")
    print('\n\t --- NEW CLIENT ---\n')
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Client already in the client\'s list')



def delete_client(client_d):
    os.system("cls")
    print('\n\t --- DELETE CLIENT ---\n')
    global clients
    _return = search_client(client_d, 1, None)
    if _return != None:
        clients.pop(_return)
        print('Client {} was deleted successfully!\n'.format(client_d['name']))



def update_client(client_u):
    os.system("cls")
    print('\n\t --- CLIENT EDITION ---\n')
    global clients
    num = int(len(clients))
    _return = search_client(client_u, 1, None)
    _check = None
    if _return != None:
        while _check == None:
            print('Insert new information about the selected client: \n')
            client = _create_obj(1)
            _check = search_client(client,2,client_u)
        clients.insert(_return, client)
        clients.pop(_return+1)
        print('\t Update successful! \n')

    

def search_client(client_d, _var, cl_up):
    os.system("cls")
    if _var == 0: 
        print('\n\t --- SEARCHING CLIENT ---\n')
    global clients
    num = int(len(clients))
    mlist = _conversor_lists(client_d, 0)
    pivot = _conversor_lists(client_d, 1)
    pibot_up = _conversor_lists(cl_up, 1)
    num2 = int(len(mlist))
    a = 0
    for i in range(num2):
        if i%4 == 0 and i !=0:
            a+=1
        if pivot[0] == mlist[i]:
            if i == 0:
                if _var == 0:
                    print('\tCliente {} is in the list.\n'.format(client_d['name']))
                    for _key, value in clients[i-(a*3)].items():
                        print(str(_key) + ': ' + str(value) )
                    return None
                elif _var == 2: #Omitimos el nombre del cliente que se quiere editar
                    if pibot_up[0] != mlist[i]:
                        print('\t Two clients cannot exist with the same name...\n')
                        return None
                else:
                    return i-(a*3)
            else:
                if _var == 0: 
                    for _key, value in clients[i-(a*3)].items():
                        print(str(_key) + ': ' + str(value) )
                    return None
                else:
                    return i-(a*3)
            break
        elif i == num2-1 and _var != 2:
                print('Client {} doesn\'t exist in the list... \n'.format(client_d['name']))
                return None



def show_list():
    os.system("cls")
    print('\n\t --- CLIENT\'S LIST ---\n')
    for idx, client in enumerate(clients):
        print('Name: {}'.format(client['name']))
        print('Company: {}'.format(client['Company']))
        print('e-mail: {}'.format(client['email']))
        print('Possition: {} \n'.format(client['position']))



def _print_wellcome():
    print('-' * 50)
    menu = """
    What would you do today?

    1 - Create client
    2 - Delete client
    3 - Update client
    4 - Search client
    5 - Show clients
    6 - Exit

    Choose an option: """
    while True:
        try:
            option = int(input(menu))

            if option == 1:
                client = _create_obj(option)
                create_client(client)
                print('\n')
                show_list()
            elif option == 2:
                client_D = _create_obj(option)
                delete_client(client_D)
                print('\n')
            elif option == 3:
                client_u = _create_obj(option)
                update_client(client_u)
                print('\n')
            elif option == 4:
                client_S = _create_obj(option)
                search_client(client_S, 0, None)
            elif option == 5:
                show_list()
            elif option == 6:
                return 1
            else:
                print('Oops! That\'s not an option. Try again...\n')
        except ValueError:
                    print('Oops! That\'s not an option. Try again...\n')



def main():
    flag = 'y'
    exit_flag = 0
    while flag == 'y' or flag == 'Y':
        exit_flag = _print_wellcome()
        if exit_flag != 0:
            break
        flag = input('\tContinue? (y/n):')

    print('*' * 100)
    print('\t\t** END PROGRAM **')
   


if __name__ == '__main__':
    main()

RETO CUMPLIDO

import sys
clients = [
    {
        "name": "David",
        "company": "Facebook",
        "position": "Java Developer",
    },
    {
        "name": "Angeles",
        "company": "Canvas",
        "position": "Designer",
    }
]
"""var clients saves name of clients"""


def create_client(client):
    """this function add the name clients with the capital letter"""
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print("The client is already in the clients list")


def list_clients():
    """this function shows the clients list"""
    for index, client in enumerate(clients):
        uid=index
        name=client['name']
        company=client['company']
        position=client['position']
        print(f"{uid} | {name} | {company} | {position}")
            

def update_client(client_id, updated_client_name):
    """this function update data about clients"""
    global clients
    if len(clients) - 1 >= client_id:
        clients[client_id] = updated_client_name
    else:
        print("Client is not in the clients list")


def delete_client(client_id):
    global clients
    for idx, client in enumerate(clients):
        if idx == client_id:
            del clients[idx] 
            break
        else: 
            print("Client is not in the clients list")


def search_client(client_name):
    for client in clients:
        if client["name"] != client_name:
            continue
        else:
            return True


def _get_client_field(field_name):
    field = None
    while not field:
        field = input(f"What is the client {field_name}?")
    return field

def _get_client_name():
    client_name = None
    while not client_name:
        client_name = input("What is the client name? ")
        if client_name == "exit":
            client_name = None
            break
    if not client_name:
        sys.exit()
    return client_name


def _get_client_from_user():
    client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'position': _get_client_field('position'),}
    return client


def _print_welcome():
    """welcome message to clients"""
    print("Welcome to my store page:")
    print("*" * 100)
    print("What would you like to do today?")
    print("[C]reate client")
    print("[R]ead list of clients")
    print("[U]pdate client")
    print("[D]elete client")
    print("[S]earch client")


if __name__ == '__main__':
    _print_welcome()
    command = input().upper()
    if command == "C":
        client = _get_client_from_user()
        create_client(client)
        list_clients()
    elif command == "R":
        list_clients()
    elif command == "U":
        client_id = int(_get_client_field('id'))
        updated_client = _get_client_from_user()
        update_client(client_id, updated_client)
        list_clients()
    elif command == "D":
        client_id = int(_get_client_field('id'))
        delete_client(client_id)
        list_clients()
    elif command == "S":
        client_name = _get_client_name()
        found = search_client(client_name)
        if found:
            print("The client is in the clients list")
        else:
            print(f"the client: {client_name} is not in clients list")
    else: 
        print("Invalid command")

Aplique los principios de DRY y agregue la funcionalidad Read para completar el CRUD:

Ánimo, ya vamos a la mitad del curso
Si no entiendes bien lo de los diccionarios, mira los cursos de facundo aquí en Platzi

Wooooow me encanta, ahora es que se pone todo esto bueno

Esta es mi solucion 😃
import sys

clients = [
{
‘name’: ‘Pablo’,
‘company’: ‘Google’,
‘email’: ‘[email protected]’,
‘position’: ‘Software Engineer’,
},
{
‘name’: ‘Ricardo’,
‘company’: ‘Facebook’,
‘email’: ‘[email protected]’,
‘position’: ‘Data Engineer’,
},
]

def create_client(client):
global clients
if client not in clients:
clients.append(client)
else:
print(‘Client already is in the client’s list’)

def _get_client_field(field_name):
field=None

while not field:
    field=input('What is the client {}?'.format(field_name))

return field

def _get_client_data():
data={
‘name’:_get_client_field(‘name’),
‘company’: _get_client_field(‘company’),
‘email’: _get_client_field(‘email’),
‘position’: _get_client_field(‘position’),
}
return data
def _get_client_name():
client_name=None
while not client_name:
client_name=input('What is the client name? ')
if client_name==‘exit’:
client_name=None
break
if not client_name:
sys.exit()
return client_name.capitalize()

def list_clients():
global clients
print(‘uid | name | company | email | position ‘)
print(’*’ * 50)

for idx, client in enumerate(clients):
    print('{uid} | {name} | {company} | {email} | {position}'.format(
        uid=idx, 
        name=client['name'], 
        company=client['company'], 
        email=client['email'], 
        position=client['position']))

def update_clients(client_idx,update_client):
global clients
if client_idx<len(clients):
clients[client_idx]=update_client
else:
print=(‘Client is not in clients list’)
print( f’The client whit uid={client_idx} was update, the new list is:’)
list_clients()

def delete_client(idx):
global clients
if idx<len(clients):
clients.pop(idx)
else:
print(“The client whit this uid dont exixt”)

def _add_comma():
global clients
clients+=’,’

def search_client(client_name):
global clients
for client in clients:
if client!=client_name:
continue
else:
return True

def _print_welcome():
print(‘WELCOME TO PLATZI VENTAS’)
print(’*’*50)
print(‘What would you like to do today?’)
print(’[C]reate client’)
print(’[D]elite client’)
print(’[U]pdate client’)
print(’[S]earch client’)
print('This is the list: ')
list_clients()

if name == ‘main’:
_print_welcome()
command=input()
command=command.upper()

if command=='C':
    client=_get_client_data()
    create_client(client)
    print('This name was add')
    list_clients()
elif command=='R':
    list_clients()
elif command=='U':
    list_clients()
    client_idx=int(input('What is his uid?'))
    update_client=_get_client_data()
    update_clients(client_idx,update_client)
elif command=='D':
    list_clients()
    client_idx=int(input('What is his uid?'))
    delete_client(client_idx)
    print(f'The client whit uid={client_idx} was delite, the new list is:')
    list_clients()
elif command=='S':
    client_name=_get_client_name()
    found=search_client(client_name)
    if found:
        print(f'The client {client_name} is in the cient\'s list')
    else:
        print('The client:{} is not in client\'s list'.format(client_name))
else:
    print("Sorry, your response wasn't reciving")

import sys

clients = [
{
‘name’: ‘Pablo’,
‘company’: ‘Google’,
‘email’: ‘[email protected]’,
‘position’: ‘Software engineer’,
},
{
‘name’: ‘Ricardo’,
‘company’: ‘FaceBook’,
‘email’: ‘[email protected]’,
‘position’: ‘Data engineer’,
}
]

def _print_welcome():
print(‘Welcomo to Platzi Sales’)
print("*" * 50)
print(‘What would you like to do today.?’)
print(’[C]eate Client’)
print(’[L]ist Client’)
print(’[U]pdate Client’)
print(’[D]elete Client’)
print(’[S]earch Client’)

def create_client(client):
#global clients
if client not in clients:
clients.append(client)
else:
print(“Client already is in the client’s list”)

def _get_client():
client = {
‘name’: _get_client_field(‘name’),
‘company’: _get_client_field(‘company’),
‘email’: _get_client_field(‘email’),
‘position’: _get_client_field(‘position’),
}
return client

def list_clients():
for idx, client in enumerate(clients):
print(’{id} | {name} | {company} | {email} | {position}’
.format(
id = idx,
name = client[‘name’],
company = client[‘company’],
email = client[‘email’],
position = client[‘position’]
)
)

def _get_client_field(field_name, msg='What is the client {}.: '):
field = None
while not field:
field = input(msg.format(field_name))
return field

def update_client(updated_id):
global clients
if updated_id >= 0 and updated_id <= len(clients) -1:
clients[updated_id] = _get_client()
else:
print(‘The Id. {} not exist in the clients list’.format(updated_id))

def delete_client(client_id):
global clients
for idx, client in enumerate(clients):
if idx == client_id:
del clients[idx]
return print(idx)
else:
print(“The client Id {id} is not in clients list”.format(id=idx))

def search_client(client_name):
for client in clients:
if client[‘name’] == client_name:
print(“The client {} is in the client list”.format(client_name))
return True
print(‘The client: {} is not in client list’.format(client_name))
return False

if name == ‘main’:
_print_welcome()
command = input()
command = command.upper()

if command == "C": #CREAR
    client = _get_client()
    create_client(client)
    list_clients()
elif command == "L": # LISTAR
    list_clients()
elif command == "U": #UPDATE
    list_clients()
    updated_client_id = _get_client_field('id')
    update_client(int(updated_client_id))
    list_clients()
elif command == "D": # DELETE
    client_id = _get_client_field('id')
    delete_client(int(client_id))
    list_clients()
elif command == "S": # SEARCH
    list_clients()
    client_name = _get_client_field('name')
    search_client(client_name)
else: # OTHERWISE
    print("Invalid command.!")
from re import U
import sys


class Client():

    def __init__(self, client_name: str = None, client_company: str = None, client_email: str = None, client_position: str = None):
        self.name = client_name
        self.company = client_company
        self.email = client_email
        self.position = client_position

    def _set_name(self, client_name):
        client_name =_get_client_attribute('name',client_name)
        self.name=client_name

    def _set_company(self, client_company):
        client_company =_get_client_attribute('company',client_company)
        self.company = client_company

    def _set_email(self, client_email):
        client_email =_get_client_attribute('email',client_email)
        self.email = client_email

    def _set_position(self, client_position):
        client_position =_get_client_attribute('position',client_position)
        self.position = client_position


clients = []
clients.append(Client('Manuel','TecM','[email protected]','Mprofessor'))
clients.append(Client('Briones','TecB','[email protected]','Bprofessor'))

def create_client(client_name):
    global clients
    
    found,client_f,idx = search_client(client_name)
    if not found:
        new_client=Client()
        new_client._set_name(client_name)
        new_client._set_company(None)
        new_client._set_email(None)
        new_client._set_position(None)
        clients.append(new_client)
    else:
        _client_exists(client_f.name)

def list_clients(to_print: bool = True):
    global clients
    for idx, client in enumerate(clients):
        print(f'El cliente {idx} es {client.name}, trabaja en {client.company} como {client.position}')

def delete_client(client_name):
    global clients
    found,client_f,idx = search_client(client_name)
    if found:
        clients.pop(idx)
    else:
        _client_doesnt_exists(client_name)


def update_client(client_name, new_client_name,new_client_company,new_client_email,new_client_position):
    global clients
    found,client_f,idx = search_client(client_name)
    if found:
        if new_client_name != 'Nc':
            clients[idx]._set_name(new_client_name)
        if new_client_company != 'Nc':
            clients[idx]._set_company(new_client_company)
        if new_client_email != 'Nc':
            clients[idx]._set_email(new_client_email)
        if new_client_position != 'Nc':
            clients[idx]._set_position(new_client_position)
    else:
        _client_doesnt_exists(client_name)


def search_client(client_name):
    global clients
    found = False
    for idx,client in enumerate(clients):
        if client_name == client.name:
            found = True
            return found, client,idx
        else:
            continue
    return found, None,None

def _get_client_attribute(attribute, client_attribute: str = None):
    while not client_attribute:
        client_attribute = input(f'Client {attribute}: ').lower().title()
        if client_attribute == 'exit':
            client_attribute = None
            break
    if not client_attribute:
        sys.exit()

    return(client_attribute)


def _client_exists(client_name):
    return print(f'{client_name} is in client\'s list')

def _client_doesnt_exists(client_name):
    return print(f'{client_name} is not in client\'s list')


def _print_welcome():
    print('Welcome to Platzi Ventas')
    print('*'*50)
    print('What would you like to do today? ')
    print('[C]reate client ')
    print('[D]elete client')
    print('[L]ist client')
    print('[U]pdate client')
    print('[S]earch client')


def main():
    _print_welcome()
    command = input().lower()

    if command == 'l':
        pass
    else:
        client_name=_get_client_attribute('name')
        if command == 'c':
            create_client(client_name)
        elif command == 'd':
            delete_client(client_name)
        elif command == 'u':
            print('\'Nc\' for no change')
            new_client_name = _get_client_attribute('new name')
            new_client_company = _get_client_attribute('new company')
            new_client_email = _get_client_attribute('new email')
            new_client_position = _get_client_attribute('new position')
            update_client(client_name, new_client_name,new_client_company,new_client_email,new_client_position)
        elif command == 's':
            found = search_client(client_name)
            if isinstance(found,int):
                _client_exists(client_name)
            else:
                _client_doesnt_exists(client_name)
    list_clients()


    

if __name__ == '__main__':
    main()

Mi aporte para actualizar informacion ya sea name o company etc

mi aporte para eliminar

Mi aporte para buscar por nombre, company y email

Mi versión

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineering'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineering'
    }
]


def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print("Client alerady is in the client's list")


def list_clients():
    for idx, client in enumerate(clients):
        print("{uid} | {name} | {company} | {email} | {position}".format(uid=idx, name=client['name'],
                                                                        company=client['company'], email=client['email'],
                                                            position=client['position']))


def _get_client_idx(client_name):
    for idx, client_id in enumerate(clients):
        if client_id['name'] == client_name:
            return idx


def update_client(client_name):
    global clients

    if search_clients(client_name):
        print(f"The client {client_name} already exists")
        print("please insert the new data")
        update_client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
        index = _get_client_idx(client_name)
        clients[index] = update_client
    else:
        print("Client is not in clients list")


def delete_client(client_name):
    global clients

    if search_clients(client_name):
        clients.remove(clients[_get_client_idx(client_name)])
    else:
        print("Client is not in clients list")


def search_clients(client_name):
    for client in clients:
        if client['name'] != client_name:
            continue
        else:
            return True
    return False


def _add_comma():
    global clients

    clients += ','


def _print_welcome():
    print("WELCOME TO PLATZI VENTAS")
    print("*" * 50)
    print("What would you like to do today?")
    print("[C]reate client")
    print("[U]pdate client")
    print("[D]elete client")
    print("[S]earch client")


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}? '.format(field_name))

    return field.capitalize()


def _get_client_name():
    client_name = None
    while not client_name:
        client_name = input('What is the client name? ')

        if client_name.lower() == 'exit':
            client_name = None
            break

    if not client_name:
        sys.exit(1)

    return client_name.capitalize()


if __name__ == '__main__':
    _print_welcome()

    command = input()
    command = command.upper()
    if command == "C":
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
        create_client(client)
        list_clients()
    elif command == "D":
        client_name = _get_client_field('name')
        delete_client(client_name)
        list_clients()
    elif command == "U":
        client_name = _get_client_field('name')
        update_client(client_name)
        list_clients()
    elif command == "S":
        client_name = _get_client_field('name')
        found = search_clients(client_name)

        if found:
            print('The client is in the client\'s list')
        else:
            print("The client: {} is not in our client's list".format(client_name))

    else:
        print('Invalid command')

HICE EL RETO y logre modificar las 3 funciones yo solo… guao! por primera VEZ estoy pensando en python directamente, fluido! este curso me ha llevado a otro nivel! de verdad, que buena decision tome al comenzarlo

Aqui les dejo todo lo que lo que tengo escrito.

Los emails siempre se cargan en minúscula y el resto de los campos lo va a cargar en mayúscula pero los obtiene tanto en minúsculas como en mayúsculas

Se puede cargar updatear cualquier campo y cositas así.

Espero ayude

import sys


clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
    {
        'name': 'Martin',
        'company': 'Casa Piola',
        'email': '[email protected]',
        'position': 'Slave',
    },
    {
        'name': 'A',
        'company': 'A',
        'email': '[email protected]',
        'position': 'A',
    },
    {
        'name': 'Martin',
        'company': 'Avencis',
        'email': '[email protected]',
        'position': 'Coordinator',
    },
]


def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('Client is already in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position'],
            ))

    
def update_client(client):
    global clients

    new_field = ""

    for index in range(len(clients)):
        if clients[index]['name'] == client['name'] and clients[index]['email'] == client['email']:
            print('What do you want to update ???? ')
            print('[N]ame')
            print('[C]ompany where you work')
            print('[E]mail')
            print('[P]osition')
            question = input()
            question = question.title()
            valid_choices = ['N', 'C', 'E', 'P']
            if question not in valid_choices:
                print('Next time choose one valid character "N, C, E, P"')
                update_client(client)
                break

            new_field = input('Write new field: ')
            new_field = new_field.title()            
            if question == 'N':
                clients[index]['name'] = new_field
                break
            elif question == 'C':
                clients[index]['company'] = new_field
                break
            elif question == 'E':
                new_field = new_field.lower()
                clients[index]['email'] = new_field
                break
            elif question == 'P':
                clients[index]['position'] = new_field
                break
    if new_field is not "":
        return
    else:
        print('\n Not user with the data input \n')


def delete_client(client):
    global clients

    for index in range(len(clients)):
        if clients[index]['name'] == client['name'] and clients[index]['company'] == client['company'] and clients[index]['email'] == client['email']:
            del clients[index]
            break

    else:
        print('Client is not in the List')

    
def search_client(client_name):
    global clients
    counter = 0
    for index in range(len(clients)):        
        if clients[index]['name'] == client_name:
            counter += 1
    
    if counter == 1:
        print('There is just one user with named {}. '.format(client_name))
    elif counter > 1:
        print('There are {} users named {}. '.format(counter, client_name))
    else:
        print('There is not user named {} in our records.'.format(client_name))

            # if counter == 0:
            #     print('No {} in our records'.format(client_name))
            #     break
            # else:
            #     print('There are {} account with this name'.format(counter))
            #     return True
            

def _get_client_field(field_name):
    field = None

    while not field:
        field = input('Whats is the client {} ?'.format(field_name))
        field = field.title()
        if field_name == 'email':
            field = field.lower()
        if field == 'Exit':
            field = None
            sys.exit()

    return field


def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('What is the client name? ')
        client_name = client_name.title()

    if client_name == 'exit':
        client_name = None
        sys.exit()

    return client_name


def _print_welcome():
    print('\n' + '-' * 42 + '\n')
    print('WELCOME to Sells for ALLs')
    print('\n' + '-' * 42 + '\n')
    print('What do you want to do?? ')
    print('[C]reate client')
    print('[L]ist clients')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


if __name__ == '__main__':
    _print_welcome()

    command = input()
    command = command.upper()

    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'D':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
        }
        print(client)
        delete_client(client)
        list_clients()
    elif command == 'U':
        client = {
            'name': _get_client_field('name'),
            'email': _get_client_field('email'),
        }
        update_client(client)
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        print(client_name + ' estamos abajo')
        # search_client(client/_name)
        search_client(client_name)

        # if found:
        #     print('The client is in our client\'s list')
        # else:
        #     print('The client {} is NOT in our client\'s list'.format(client_name))
    else:
        print('Invalid input')


Reto: Depaso ahorramos algo de codigo

import sys

clients = [
    {
    'name':'Pablo',
    'company': 'google',
    'email': '[email protected]',
    'position': 'Software Engineer',
    },
    {
    'name':'Ricardo',
    'company': 'Facebook',
    'email': '[email protected]',
    'position': 'Data Enginner',
    }

      ]



def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position'])
            )


def create_client(client):
    global clients      # con global podemos usar variables externas dentro de la funcion
    if client not in clients:
        clients.append(client)
    else:
        print('The client already is in the client\'s list')


def search_client(client_name):
    global clients
    valid = False
    for idx, client in enumerate(clients):
        if client_name in client.values():
            valid = True
            index = idx
            break

    return valid, index


def update_client(update_client, index):
    global clients
    clients[index] = update_client


def delete_client(index):
    global clients
    clients.pop(index)


def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print("*"*50)
    print('What do you like to do today')
    print('[C]reate Client')
    print('[L]ist Client')
    print('[U]pdate Client')
    print('[D]elete Client')
    print('[S]earch Client')

def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {}?'.format(field_name))

    return field


def _get_client_field_all():
    client = {
                    'name': _get_client_field('name'),
                    'company': _get_client_field('company'),
                    'email': _get_client_field('email'),
                    'position': _get_client_field('position'),
                 }
    return client


def _get_client_name():
    client_name = None

    while not client_name:
        client_name= input('What is the client name? ')
        if client_name == 'exit':
            client_name = None
            break

    if not client_name:
        sys.exit()
    return client_name

if __name__ == '__main__':

    _print_welcome()
    command = input()
    command = command.upper()
    if command == 'C':
        client = _get_client_field_all()
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        is_valid, index = search_client(client_name)
        if is_valid:
            delete_client(index)
        else:
            print('The Client is not in Client\'s list')
        list_clients()
    elif command == 'U':
        client_name = _get_client_name()
        is_valid, index = search_client(client_name)
        if is_valid:
            updated_client = _get_client_field_all()
            update_client(updated_client,index)
        else:
            print(' The Client is not in Client\'s list')

        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)[0]
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client {} is not in our client\'s list'.format(client_name))
    else:
        print('Invalid Command')



Mi solución, lo que hice fue validar primero si el cliente existía, tanto para poder crearlo, actualizar o eliminar. Perdón por el mal ingles.

<
clients = [
    {
        'name': 'David Fernando',
        'company': 'google',
        'email': '[email protected]',
        'position': 'engenieer'
    },

    {
        'name': 'David Josué',
        'company': 'amazon',
        'email': '[email protected]',
        'position': 'architect engenieer'
    }
]


def get_index_client(name):

    for index, clientupdate in enumerate(clients):
        if clientupdate ['name'] == name:
            return index


def validate_client(name):
    global clients
    tem= True
    for c in clients:
        if name == c['name']:
            
            tem=True 
            return tem
               
        else:
            tem=False

    return tem

def add_client(client):
    
        global clients
        clients.append(client)
        print("name added successfully")
        list_client()

      
def print_welcome():
    print("******WELCOME PLATZI VENTAS ***** ")
    print('-'*50)
    print('What would you like to do today ?')
    print('[C] Create client')
    print('[R] Read client')
    print('[U] Update client')
    print('[D] Delete client')
    print('[S] Search client')

def get_client_field(option):
    opt = True
    while opt:
        dato = input(f'What is the {option} ')
        
        if dato !=None:
            opt = False
   
    return dato
    
def question_of_name():
    name = input("What is the name of the client")
    return name

def list_client():
    global clients
    for index, cliente in enumerate(clients):
        
        print(f"{index} | {cliente['name']} | {cliente['company']} | {cliente['email']} | {cliente['position']}")

def update_client(client):
    global clients
    index = get_index_client(client['name'])
    clients[index]=client
    list_client()

def delete_client(index):
    global clients
    
    clients.pop(index)
    list_client()
    

def search_client(name):
    
    global clients
    for index, cliente in enumerate(clients):
        if name == cliente['name']:
            print(f"{index} | {cliente['name']} | {cliente['company']} | {cliente['email']} | {cliente['position']}")    
        

if __name__ == "__main__":

    
    print_welcome()

    option = input(" ").upper()
    if option == 'C':

        name= get_client_field('name')
        
        if not validate_client(name):
            client={
            'name':name,
            'company':get_client_field('company'),
            'email':get_client_field('email'),
            'position':get_client_field('position')
            }
            add_client(client)
        else:
            print('the name of client already exists')
    elif option == 'R':
        list_client()
    elif option == 'U':

        name = get_client_field('name')
        if validate_client(name):
            client={
                'name':name,
                'company':get_client_field('company'),
                'email':get_client_field('email'),
                'position':get_client_field('position')
            }
            update_client(client)

        else:
            print("the client does not exist")
    elif option == 'D':
        name = get_client_field('name')
        if validate_client(name):
            delete_client(get_index_client(name))

        else:
            print("the client does not exist")
    elif option == 'S':
        name = get_client_field('name')
        if validate_client(name):
            search_client(name)
        else:
            print("the client does not exist")
            

> 

También se puede listar de la siguiente forma, ya no tendríamos que utilizar enumerate.

def list_client():
    for i in range(len(clients)):
        print('{}: {}'.format(i,clients[i]['name']))
<
import sys
from ast import Delete
from http import client
from turtle import position


clients = [
    {
        'name':'Pablo',
        'company': 'Google',
        'email' : '[email protected]',
        'position' : 'Software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email' : '[email protected]',
        'position' : 'Data engineer',

    }


]


def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        _client_was_found()


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company}  {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position'],
        ))


def update_client (client_name, updated_client_name):
    global clients

    if client_name in clients:
        index = clients.index(client_name)
        clients[index] = updated_client_name
    else:
        _client_not_found()


def delete_client(client_name):
    global clients
    for client in clients:
        if client_name == client['name']:
           command = input('Estas seguro de borrar este cliente? Y/N ')
           command = command.upper()
           if command == 'Y':
                clients.remove(client)
           else:
               print('Se cancelo el proceso de borrar un usuario')
               sys.exit()
        else:
            _client_not_found()


def search_client(client_name):
    for client in clients:
        if client['name'] != client_name:
            continue
        else:
            return True


def _print_welcome():
    print('BIENVENIDOS A PLATZI VENTAS')
    print('*'*50)
    print('Que quieres hacer hoy?')
    print('[C]reate client')
    print('[L]ist clients')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None

    while not field:
        field = input('Cual es el {}?  '.format(field_name))
    return field

def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('Cual es el nombre del cliente? ')

        if client_name == 'exit':
            break
        if not client_name:
            sys.exit()

    return client_name


def _get_index(client_name):
    global clients

    for idx, client in enumerate(clients):
        print(idx)
        if client['name'] == client_name:
            return idx

def _client_not_found():
    return print('El cliente no esta registrado en la lista')


def _client_was_found():
    print('El cliente ya esta registrado en la lista')


if __name__ == '__main__':
    _print_welcome()
    command = input("Escribe un comando: ")
    command = command.upper()
    if command == 'C':
        client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('comapany'),
        'email' : _get_client_field('email'),
        'position' : _get_client_field('position'),
        }

        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()
    elif command == 'U':
        client_name = _get_client_name()
        updated_client_name = input('Inglrese la actualizacion en el nombre: ')
        update_client(client_name, updated_client_name)
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)
        if found:
            print('Se encontro el cliente en la lista')
        else:
            _client_not_found()
    else:
        print('Comando invalido')

> 

Mi solución del curso hasta ahora, sin usar POO, tuplas, sets, y decoradores.

import sys
clients: list = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer',
    },
    {
        'name': 'Mauricio',
        'company': 'Reserve',
        'email': '[email protected]',
        'position': 'Backend developer',
    }
]


def _get_client_data():
    client: dict = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position')
    }

    return client


def _create_client():
    request: bool = True
    while request:
        client = _get_client_data()

        if client not in clients:
            clients.append(client)
        else:
            print(f'Client "{client["name"]}" already is in the client\'s list')
        
        user_chose = input("Do you want to continue? Y/N: ")
        user_chose = user_chose.upper()
        
        if user_chose == "Y" or user_chose == "YES":
            request = True
        elif user_chose == "N" or user_chose == "NO":
            request = False
            print("-"*50)
            print("\nOk! Request Completed successfully")
        else:
            request = False
            print("Stopping...")


def _delete_client(client_id):
    is_valid, index = client_id

    if is_valid:
        client = clients[index]
        while True:
            confirm = input(f"Are you secure to remove {client['name']} from client\'s data?: ").upper()
            if confirm == "YES":
                print(f'{index}: {clients[index]} was delete')

                del(clients[index])
                list_clients()
                break
            elif confirm == "NO":
                print("Stopping...")
                break
            else:
                print('Print Yes or No to continue')
    else:
        print('Client isn\'t in the client list.')


def _get_client_id() -> list[bool, int]:
    """
    Get a user integer id
    """
    is_logic: bool = False

    while not is_logic:
        try:
            # If the user sent a not valid value, use exception for error's prevention
            client_id: int = int(input('- Write client id: '))
            is_valid = True

            if clients[client_id] not in clients:
                print('Sorry, that index is out of range or was not found')
                is_valid = False

            return [is_valid, client_id]

        except IndexError:
            print('Please write a valid index')

        except ValueError:
            print('Please write a number.\n')


def _get_client_field(data):
    """
    Return a username
    """
    client_info = None

    while not client_info:
        print(f'{"-" * 20} # insert "exit" to break')
        client_info = str(input(f'Client\'s {data}: '))

        if client_info.lower() == 'exit':
            client_info = None
            break

    if not client_info:
        sys.exit()

    return client_info


def _update_client(client_id: list):
    validator = client_id[0]
    index = client_id[1]

    if validator:
        new_client: dict = _get_client_data()

        clients[index] = new_client
    else:
        print('Client is not in the client list.')


def _read_clients():
    print('[s] to show this list')
    print('[f] to find a client')
    chose: str = input('Please, chose one: ').lower()

    if chose == 's':
        list_clients()
    elif chose == 'f':
        target, index = _get_client_id()

        if target:
            client = clients[index]
            print(f'The client {client["name"]} was found!')
        else:
            print(f'The client was not found')
    else:
        print('Ups! We don\'t have that option.\nPlease send feedback at @maucoder on twitter to more updates!')


def _print_welcome():
    print('Welcome to CMT POS')
    print('-'*50)
    print('What would you like to do today')
    print('Create clients - Write "C"')
    print('Show clients - Write "R"')
    print('Update clients - Write "U"')
    print('Delete clients - Write "D"')


def list_clients():
    for idx, client in enumerate(clients):
        print(f'{idx}: {client["name"]} | {client["company"]} | {client["email"]} | {client["position"]}')


def run():
    global clients
    _print_welcome()

    command = input("\nYour chose: ").lower()
    
    if command == 'c':
        _create_client()
        list_clients()
    elif command == 'r':
        _read_clients()
    elif command == 'd':
        client = _get_client_id()

        _delete_client(client)
    elif command == 'u':
        client = _get_client_id()
        _update_client(client)

        list_clients()
    else:
        print('Invalid command, please select an available option')


if __name__ == '__main__':
    run()

hola!
Esta es mi solución validando si el usuario existe con la llave 'name' antes de realizar alguna acción como pedir datos del cliente

import sys


clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineer'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer'
    }
    
]


def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('\ Client already is in the client\'s list')
    
    
def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print(f"\n{idx} || {client['name']} || {client['company']} || {client['email']} || {client['position']}")


def update_client(index: int, updated_client):
    global clients
    
    clients[index] = updated_client
    print(f"\n Updated client")
    return


def delete_cliente(index: int):
    global clients
    
    del(clients[index])
    print(f"\n Deleted client")
    return


def search_client(client_name):
    global clients
    
    for client in clients:
        index = clients.index(client)
        if client_name == client['name']:
            return True, index
        
    print(f"\n The client {client_name} is not in our client\'s list")
    return False, False


def _print_welcome():
    print('\n     WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would you like to do today')
    print('[C]reate client')
    print('[L]ist client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(command, field_name):
    field = None
    if command == 'C':
        while not field:
            field = input(f" What is the client {field_name}: ").capitalize()
    elif command == 'U':
        while not field:
            field = input(f" What is the updated client {field_name}: ").capitalize()
    elif command == 'D':
        while not field:
            field = input(f" What is the {field_name} of the client to delete: ").capitalize()
       
    return field
    

if __name__ == '__main__':    
    _print_welcome()
    command = input('\n → ').upper()
    
    if command == 'C':
        client = {'name': _get_client_field(command,'name'),
                  'company': _get_client_field(command,'company'),
                  'email': _get_client_field(command,'email'),
                  'position': _get_client_field(command,'position')          
        }
        
        create_client(client)
        list_clients()
      
    elif command == 'L':
          list_clients()
        
    elif command == 'D':
        client_name = _get_client_field(command, 'name')
        found = search_client(client_name)
        if found[0]: 
            delete_cliente(int(found[1])) #found[1]= index si el cliente existe en clients
        list_clients()
        
    elif command == 'U':
        client_name = _get_client_field('C', 'name')
        found = search_client(client_name)
        if found[0]:
            updated_client = {'name': _get_client_field(command,'name'),
                  'company': _get_client_field(command,'company'),
                  'email': _get_client_field(command,'email'),
                  'position': _get_client_field(command,'position')          
            }
            update_client(int(found[1]), updated_client)
        list_clients()        
        
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)
        if found[0]:
            print('\n The client is in the client\'s list')
            
    else:
        print('\nInvalid Command')     

Les comparto mi versión del código.

import sys


clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    }
]


def create_client(client):
    global clients
    clients.append(client)


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position'],
        ))


def update_client(client_name, new_client):
    global clients

    for idx,client in enumerate(clients):
        if client['name'] == client_name:
            clients[idx] = new_client


def delete_client(client_name):
    global clients

    for idx,client in enumerate(clients):
        if client['name'] == client_name:
            clients.pop(idx)
            break


def search_client(client_name):
    found = False

    for client in clients:
        if client['name'] == client_name:
            found = True
            print("Client name {} was found".format(client_name))
            break

    if not found:
        print("Client name {} was not found".format(client_name))

    return found


def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input("What is the client name? ")
        if client_name == 'exit':
            sys.exit()

    return client_name


def _create_client_dict():
    client_fields = ['name', 'company', 'email', 'position']
    client = {}

    for field in client_fields:
        while not client.get(field):
            client[field] = input("What is the new {}? ".format(field))
            if client[field] == 'exit':
                client = {}
                sys.exit()

    return client


def _print_welcome():
    print("\nWELCOME TO PLATZI VENTAS")
    print("*" * 50)
    print("What would you like to do today?")
    print("[C]reate client")
    print("[D]elete client")
    print("[U]pdate client")
    print("[S]earch client")
    print("[E]xit\n")


if __name__ == '__main__':

    while True:
        _print_welcome()

        command = input(": ")
        command = command.upper()

        if command == "C":
            client = _create_client_dict()
            found = search_client(client['name'])
            if not found:
                create_client(client)
            else:
                print("Client is already in list!")
            list_clients()
        elif command == "D":
            client_name = _get_client_name()
            found = search_client(client_name)
            if found:
                delete_client(client_name)
            list_clients()
        elif command == 'U':
            client_name = _get_client_name()
            found = search_client(client_name)
            if found:
                new_client = _create_client_dict()
                update_client(client_name, new_client)
            list_clients()
        elif command == 'S':
            client_name = _get_client_name()
            search_client(client_name)
            list_clients()
        elif command == 'E':
            print("Good bye!")
            break
        else:
            print("Invalid command!")```

Utilicé el nombre del cliente como referencia en las búsquedas. En un ambiente productivo creería que es mejor utilizar el email, el cual debiera ser el identificador único de cada usuario.

Modifiqué unas cosas para que imprima de una vez si el usuario no está en la lista

import sys


clients = [
    {
        "name": "Pablo",
        "company": "google",
        "email": "[email protected]",
        "position" :"Software engineer",
    },
    {
        "name": "Ricardo",
        "company": "facebook",
        "email": "[email protected]",
        "position" :"Data engineer",
    }
    
]

def create_client(client):
    global clients

    if client not in clients:
        
        clients.append(client)        

    else:
        print('Client already is in the client\'s list')

def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(uid =idx, 
                                                                    name = client['name'],
                                                                    company = client['company'],
                                                                    email = client['email'],
                                                                    position = client['position']))
                                                

def update_client(client_id, updated_client):
    global clients


    clients[client_id] = updated_client 
    
             
def delete_client(client_name):
    global clients

    if client_name in clients:
        clients.remove(client_name)
    else:
        print('Client is not in clients list')


def search_client(client_name):

    for client in clients:
        if client != client_name:
            continue
        else:
            return True     


def _print_welcome():
    print('WELCOME TO PLATZY VENTAS')
    print('*'*50)
    print('What would you like to do today?')
    print('[L]ist clients')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}: '.format(field_name))
    
    return field


def _get_client_name():
    client_name = None

    while not client_name:
        client_name =  input('What is the client name?')

        if client_name == 'exit':
            client_name = None
            break

    if not client_name:
            sys.exit()   


    return client_name  

def _get_client_from_user():
    client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position'),
    }

    return client  


if __name__ =='__main__':
    _print_welcome()

    command = input('Ingresa una opcion: ')
    command = command.upper()

    if command == 'C':
        client ={
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
            
            }
       
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()

    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()
    
    
    elif command == 'U':
        client_id = int(_get_client_field('id'))
        

        if client_id <=len(clients):        
            updated_client = _get_client_from_user()

            update_client(client_id, updated_client)
            list_clients()

        else:
            print('Client is not in client\'s list')        
        

    elif command =='S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            print('The client is in the client\' list')

        else:
            print('The client: {} is not in our client\'s list'.format(client_name))


    
    
    
    
    
    else:
        print('Invalid command')

Let me show my poor code🤪😵

import sys
import os

client_list = [
    {
        'Name': 'Kathy',
        'Last Name': 'Ulloa Garcia',
        'Position': 'Agent',
        'Company': 'CCD
    },
    {
        'Name': 'Brayan Alexander',
        'Last Name': 'Vasquez',
        'Position': 'Student',
        'Company': 'Who knows....'
    },
]

def check_if_in_list(name): # ALREADY RUNNING UNDER DICTIONARY
    global client_list

    for dictionary in client_list:
        if name not in dictionary['Name']:
            return True
        else:
            return False


def _optimization(client):
    _temp_dicitonary = {
        'Name': '{}'.format(client),
        'Last Name': '{}'.format(__get_client_field('Last Name')),
        'Position': '{}'.format(__get_client_field('Position')),
        'Company': '{}'.format(__get_client_field('Company'))
    }
    return _temp_dicitonary


def _add_client(client_name): # ALREADY RUNNING UNDER DICTIONARY
    global client_list

    if check_if_in_list(client_name):
        client_list.append(_optimization(client_name))
    else:
        print("Already in the list.")


def _search_client(client_name): # ALREADY RUNNING UNDER DICTIONARY
    global client_list
 
    for _dictionary in client_list:
        
        if client_name not in _dictionary['Name']:
            continue
        else:
            return True


def _update_client(client_name, updated_name): # ALREADY RUNNING UNDER DICTIONARY
    global client_list
    element_updated = False

    for _dictionary in client_list:
        if client_name in _dictionary['Name']:
            
            _dictionary.update(_optimization(updated_name))
            element_updated = True

    if element_updated:
        print(f'Element {client_name}, sucessfully removed')
    else:
        print(f'Element {client_name}, not updated/found')


def _delete_client(client_name): # ALREADY RUNNING UNDER DICTIONARY
    global client_list
    _index = 0
    element_removed = None

    for _dictionary in client_list:
        if _dictionary['Name'] == client_name:
            element_removed = client_list.pop(_index)
        _index += 1

    if element_removed != None:
        print(f'Element {client_name}, sucessfully removed')
    else:
        print(f'Element {client_name}, not removed/found')


def view_list(): # ALREADY RUNNING UNDER DICTIONARY
    global client_list

    for field in client_list:
        print(f"\nNombre: {field['Name']} \nApellido: {field['Last Name']} \nPosicion: {field['Position']} \nCompany: {field['Company']}")
        

def _welcome_window():
    os.system('cls')
    print(8 * "*" + "  WELCOME TO THIS CLIENT SERVICE  " + 8 * "*")
    print("MAIN MENU:\n")

    print("[A]dd new Client")
    print("[U]pdate  Client")
    print("[D]elete  Client")
    print("[S]earch  Client")
    print("[E]xit")

    what_to_do = ""
    while what_to_do == "":
        what_to_do = input("\nwhat would you like to do: ")

    return what_to_do
 

def __get_client_field(working_with):

    field = ""
    while field == "":
        field = input(f"What's Client's {working_with}: ")

    return field


def _control(decition):
    decition = decition.upper()

    if decition == "A":

        _add_client(__get_client_field('Name'))
        
    
    elif decition == "U":

        _update_client(__get_client_field('Name'), __get_client_field('Name'))
        

    elif decition == "D":
        
        _delete_client(__get_client_field('Name'))
        

    elif decition == "S":

        if _search_client(__get_client_field('Name')):
            print(f"\nName was found")
            view_list()
            input('\nPress Any key to Continue....')
        else:
            print("Name wasnt found")
    
    elif decition == "E":
        sys.exit()
    else:
        print("Invalid Command")

if __name__ == "__main__":
    new_command = None
    while new_command != 'E':
        new_command = _welcome_window()
        _control(new_command)

Probe el codigo del profesor en la funcion DELETE pero al eliminar el indice cero si volvia a listar los clientes me mostraba 2 indices ceros y no liminaba el cliente diciendo que no estaba en la lista de clientes.
Le di vueltas pero la verdad no se por que ese “bug” jejeje.

Aqui les dejo mi trozo de codigo de la funcion DELETE_CLIENT, el resto del condigo es casi igual

#DELETE
def delete_client(client_id):
  global clients

  if client_id == 0:
    clients.pop(0)
  elif len(clients) - 1 == client_id:
    clients.remove(clients[client_id])
  else:
    print('Client is not in clients list')

def _get_index_dict(seq, key):
return next((index for (index, d) in enumerate(seq) if d[“name”] == key), None)

El reto:

import sys
import os

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data engineer'
    }
]


def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    global clients

    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position']))



def update_client(client_id, updated_client):
    global clients
    if client_id <= len(clients) - 1:
        clients[client_id] = updated_client
    else:
        _message_not_client()
            



def delete_client(client_id):
    global clients

    for idx, client in enumerate(clients):
        if idx == client_id:
            del clients[idx]
            break
        


def search_client(client_name):
    global clients


    for client in clients:
        if client != client_name:
            continue
        else:
            return True


def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would you like to do day?')
    print('[C]reate client')
    print('[L]ist clients')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {}? '.format(field_name))
    return field


def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('What is the client name? ')

        if client_name == 'exit':
            client_name = None
            break

    if not client_name:
            sys.exit()

    return client_name


def _message_not_client():
    print('Client is not in client\'s list')


def _get_client():
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),

        } 
        return client


if __name__ == '__main__':
    os.system('clear')
    _print_welcome()

    command = input()
    command = command.upper()

    if command == 'C':
        client = _get_client()
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'D':
        client_id = int(_get_client_field('uid'))
        delete_client(client_id)
        list_clients()
    elif command == 'U':
        client_id = int(_get_client_field('uid'))
        updated_client = _get_client()
        update_client(client_id, updated_client)
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)

        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))
    else:
        print('Invalid command')


    

en esta version puedes ENCONTRAR AL CLIENTE SOLO CON EL NOMBRE para cada caso y despues agregar los campos que tengas que agregar o modificar. asi mismo el codigo esta modularizado y creo que se puede editar para buscar otro parametro como “id”. me esta pareciendo genial este curso como repaso de todo lo visto hasta ahora en la carrera de backend con Python.

import sys
from typing import Collection

clients = [
    {
        'name': 'Pablo',
        'company': 'google',
        'email': '[email protected]',
        'position': 'software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'facebook',
        'email': '[email protected]',
        'position': 'data engineer',
    }
]

def create_client(client):
    global clients
    
    if client not in clients:
        clients.append(client)
    else:
        print(f'The {client.get("name")}is already in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print(f'{idx}: {client.get("name"),client.get("company"),client.get("email"), client.get("position")}')
        
        # MANERA ALTERNA DE HACERLO:
        # print('{uid} | {name} | {company} | {email} | {position}'
        # .format(uid=idx, 
        #     name=client['name'],
        #     company=client['company'],
        #     email=client['email'],
        #     position=client['position']))


def search_client(client_name):  # funcion para buscar y confirmar la existencia de un cliente.
    global clients

    index = [0]
    found = False
    for idx,client in enumerate(clients):  # enumerate devuelve los valores  del "indice idx" y en "clients" que hay en ese indice correspondiente y los guarda en "client".
        for name in client.values():  # idx es el indice de los diccionarios con los datos de los clientes en "clients" y al llamarlo aqui podemos llamar a los valores que contiene con el metodo ".values()", por que hace referencia automatica a esta lista anidada.
            if client_name == name:
                found = True
                index = int(idx)
                return found, index
            
    return found, index # regresa dos valores despues de generar todas las iteraciones y no encontrar nada


def update_client(client_name):
    global clients

    client_found, index = search_client(client_name)  # se hace swaping para retomar los dos valores que se generan en la funcion: un booleano y un indice numerico
    if client_found:
        update_client_fields = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }  
        clients[index] = update_client_fields
    else:
        _not_client_found(client_name)


def delete_client(client_name):
    global clients

    client_found, index = search_client(client_name)
    if client_found:
        clients.pop(index) # elimina todo el diccionario con los datos del cliente en el index señalado
    else:
        _not_client_found(client_name)


def _print_welcome():
    print('\nWELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('what would you like to do today? ')
    print('[C]reate client')
    print('[L]ist clients')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None
    while not field:
        field = input(f'What is the client {field_name}?')
    
    return field
    

def _get_client_name(action):
    client_name = None

    while not client_name:
        client_name = input((f'What is the client name to {action}?').strip() )

        if client_name == 'exit':
            client_name = None
            break
    if not client_name:
        sys.exit()

    return client_name


def _not_client_found(client_name):
    print(f'{client_name} is not in client list')


if __name__ == '__main__':
    _print_welcome()
    
    command = input()
    command = command.upper()

    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
        create_client(client)
        list_clients()
    elif command == 'L': #LISTO*******
        list_clients()
    elif command == 'U': #LISTO*******
        action = 'Update'
        client_name = _get_client_name(action)
        update_client(client_name)
        list_clients()
    elif command == 'D': #LISTO*******
        action = 'Delete'
        client_name = _get_client_name(action)
        delete_client(client_name)
        list_clients()
    elif command == 'S': #LISTO*******
        action = 'Search'
        client_name = _get_client_name(action)
        client_found, index = search_client(client_name)  # esta variable toma ambos valores que la funcion devuelve

        if client_found: # tres opciones de imprimir los resultados
            print(f'The {client_name} is in the client\'s list')
            # print(f'{index}: {clients[index].get("name")}:{clients[index].get("company")}:{clients[index].get("email")}:{clients[index].get("position")}')
            # print(f'{index}: {clients[index].values()}')
            print(f'{index}: {clients[index]}')
        else:
            _not_client_found(client_name)
    else:
        print('Invalid command')


Esta fue mi forma de plantear Update
lo que hice fue crear un diccionario interno y ver que valores queria que actualizara y cuales no

def update_client(update_client_name, client_name):
    global clients
    for client in clients:
        if updated_client_name in client['name']:
            print('If you don\'t want to update a die, just put \None')
            client_list = {'name' : client_name, 'company' : _get_client_field('company'), 'email' :_get_client_field('email'), 'position': _get_client_field('position')}
            for key , value in client_list.items():
                if value == 'None':
                    client_list[key] = client[key]
            client.update({'name' : client_list['name'], 'company' :client_list['company'], 'email': client_list['email'], 'position': client_list['position']})
        else:
            print('Client is not in clients list')

Hola amigos,
Comparto mi implementación del la función update_client()
.

Reto: realizado con Python 3.10

from typing import List, Dict

import sys
import re

rgx_input = re.compile(r'\w+:.*')

clients: List[Dict[str, str]] = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Sofware Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
]

def create_client(client: Dict[str, str]):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print("Client is already in the client's list.")
        

def read_clients():
    for index, client in enumerate(clients, start = 1):
        print(
            """
              uid: {iud},
              name: {name},
              company: {company},
              email: {email},
              position: {position}
            """.format(
                  iud = index,
                  name = client['name'], 
                  company = client['company'],
                  email = client['email'],
                  position = client['position']
                )
        )
        
        
def update_client(key: str, old_value: str, new_value: str):
    global clients

    client_filteted: List[Dict[str, str]] = _filter_list(clients, key, old_value)
    
    for client in client_filteted:
        client.update({key: new_value})


def delete_client(key: str, value: str):
    global clients

    client_filtered: List[Dict[str, str]] = [
        client for client in clients if not (client.get(key) == value)
    ]
    clients = client_filtered
        
        
def search_client(key: str, value: str) -> bool:
    global clients
    
    client: List[Dict[str, str]] = _filter_list(clients, key, value)
    return True if client else False


def _print_welcome():
    print('Welcome to Platzi ventas.')
    print('*' * 50)
    print('What would you like to do today?')
    print('[C]reate a client')
    print('[R]ead the clients')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch a client')
    print('*' * 50)
    

def _get_client_field(field_name: str) -> str:
    field: str = None
    
    while not field:
        field = input('What is the client {}? '.format(field_name))
        
    return field

  
def _get_list() -> List[str]:
    key_value: str = None
    
    while not key_value:
        key_value = input('Enter the key & value separated by ":" ')
        
        if key_value == 'exit':
            key_value = None
            break
        
    if not key_value:
        sys.exit()

    assert type(re.search(rgx_input, key_value).string) == str, f'Input the key & value separated by ":" '
    return key_value.split(':')


def _filter_list(
            list_dict: List[Dict[str, str]],
            key: str,
            value: str
    ) -> List[Dict[str, str]]:

    filtered: List[Dict[str, str]] = list(filter(
            lambda arr: arr.get(key) == value, list_dict
        )
    )
    return filtered


def main():
    _print_welcome()
    
    selection: str = input()
    selection = selection.upper()
    
    match selection:
        case 'C':
            
            client: Dict[str, str] = {
                'name': _get_client_field('name'),
                'company': _get_client_field('company'),
                'email': _get_client_field('email'),
                'position': _get_client_field('position')
            }
            create_client(client)
            read_clients()
        
        case 'R':

            read_clients()
            
        case 'U':
            
            arr: List[str] = _get_list()
            assert len(arr) == 3, f'Input the key: old value: new value correctly.'
            update_client(arr[0], arr[1], arr[2])
            read_clients()
            
        case 'D':
            
            arr: List[str] = _get_list()
            assert len(arr) == 2, f'Input the key & value separated by ":" '
            delete_client(arr[0], arr[1])
            read_clients()
            
        case 'S':
            
            arr: List[str] = _get_list()
            assert len(arr) == 2, f'Input the key & value separated by ":" '
            print(f'Is {arr[1]} in the client list? {search_client(arr[0], arr[1])}')
        
        case _:
            print('Invalid input.')
            sys.exit()


if __name__ == '__main__':
    main()

Mi aporte

import sys
clients = [
    {
        'name':'pablo',
        'company':'google',
        'email':'[email protected]',
        'position':'software enginner'
    },
    {
        'name':'ricardo',
        'company':'facebook',
        'email':'[email protected]',
        'position':'data enginner'
    }
]


def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print("{uid} | {name} | {company} | {email} | {position}".format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position'],
        ))

def update_client(client_name, updated_client):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            clients.pop(idx)
            clients.insert(idx,updated_client)
            break
        
    if not client_found:
        print('Client is not in clients list')

def delete_client(client_name):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            clients.pop(idx)
            break

    if not client_found:
        print('Client is not in clients list')

def search_client(client_name):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            break

    return client_found


def _print_welcome():
    print('Bienvenidos a platzi ventas')
    print('*'*50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[L]ist clients')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None

    while not field:
        field=input('What is the client {}? '.format(field_name))

    return field

def _get_client_name(action):
    client_name=None

    while not client_name:
        client_name=input('What is the client name to {}? '.format(action))

        if client_name=='exit':
            client_name=None
            break

    if not client_name:
        sys.exit()
    
    return client_name


if __name__=='__main__':
    _print_welcome()

    command = input()
    command=command.upper()

    if command=='C':
        client ={
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position')
        } 
        create_client(client=client)
        list_clients()
    elif command=='D':
        client_name=_get_client_name('delete')
        delete_client(client_name)
        list_clients()
    elif command=='L':
        list_clients()
    elif command=='U':
        client_name = _get_client_name('update')
        updated_client = {
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position')
        } 
        update_client(client_name=client_name, updated_client=updated_client)
        list_clients()
    elif command=='S':
        client_name = _get_client_name('Search')
        found=search_client(client_name)
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in out client\'s list'.format(client_name))
        list_clients()
    else:
        print('Invalid command')

    

Yo lo resolví de esta manera.

import sys
clients = [
    {
        'name':'pablo',
        'company':'google',
        'email':'[email protected]',
        'position':'software enginner'
    },
    {
        'name':'ricardo',
        'company':'facebook',
        'email':'[email protected]',
        'position':'data enginner'
    }
]


def create_client(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print("{uid} | {name} | {company} | {email} | {position}".format(
            uid=idx,
            name=client['name'],
            company=client['company'],
            email=client['email'],
            position=client['position'],
        ))

def update_client(client_name, updated_client):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            clients.pop(idx)
            clients.insert(idx,updated_client)
            break
        
    if not client_found:
        print('Client is not in clients list')

def delete_client(client_name):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            clients.pop(idx)
            break

    if not client_found:
        print('Client is not in clients list')

def search_client(client_name):
    global clients

    client_found:bool = False
    
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            client_found=True
            break

    return client_found


def _print_welcome():
    print('Bienvenidos a platzi ventas')
    print('*'*50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[L]ist clients')
    print('[D]elete client')
    print('[S]earch client')

def _get_client_field(field_name):
    field = None

    while not field:
        field=input('What is the client {}? '.format(field_name))

    return field

def _get_client_name(action):
    client_name=None

    while not client_name:
        client_name=input('What is the client name to {}? '.format(action))

        if client_name=='exit':
            client_name=None
            break

    if not client_name:
        sys.exit()
    
    return client_name


if __name__=='__main__':
    _print_welcome()

    command = input()
    command=command.upper()

    if command=='C':
        client ={
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position')
        } 
        create_client(client=client)
        list_clients()
    elif command=='D':
        client_name=_get_client_name('delete')
        delete_client(client_name)
        list_clients()
    elif command=='L':
        list_clients()
    elif command=='U':
        client_name = _get_client_name('update')
        updated_client = {
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position')
        } 
        update_client(client_name=client_name, updated_client=updated_client)
        list_clients()
    elif command=='S':
        client_name = _get_client_name('Search')
        found=search_client(client_name)
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in out client\'s list'.format(client_name))
        list_clients()
    else:
        print('Invalid command')

    

Esta es mi versión.
Ya ingresé manejo de errores por si se ingresa un número mayor al de la lista y también por si se ingresa una letra en lugar de un número para el índice
Cualquier retroalimentación es bienvenida

import sys


clients: list = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data engineer',
    }
]


def create_client(client: dict) -> None:
    global clients
    if client not in clients:
        clients.append(client)

    else:
        print('Client is already registered')


def list_clients() -> None:
    for idx, client in enumerate(clients):
        name = client['name']
        company = client['company']
        email = client['email']
        position = client['position']
        print(f'{idx}{" "*(4-len(str(idx)))}|{name}{" "*(10-len(name))}|{company}{" "*(20-len(company))}|{email}{" "*(25-len(email))}|{position}')


def update_client(client_id: int, updated_client: dict) -> None:
    global clients

    for idx, _ in enumerate(clients):
        if idx == client_id:
            clients[idx] = updated_client
    


def delete_client(client_id: int) -> None:
    global clients
    if client_id < len(clients):
        for idx, _ in enumerate(clients):
            if idx == client_id:
                del clients[idx]
    else:
        raise IndexError('The index introduced, is incorrect')


def search_client(client_id: int) -> bool:
    global clients
    
    found = False
    for idx, _ in enumerate(clients):
        if idx == client_id:
            found = True
            break
    
    return found


def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*'*50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[D]elete client')
    print('[U]pdate client')
    print('[S]earch client')
    print('[L]ist clients')


def _get_client_field(field_name: str) -> str:
    field = None
    while not field:
        field = input(f"What's the client {field_name}\n->")
    return field
    

# def _get_client_name() -> str:
#     client_name = None

#     while not client_name:
#         client_name = input("What's the client name?\n-> ")
        
#         if client_name == 'exit':
#             client_name = None
#             break

#     if not client_name:
#         sys.exit()

#     return client_name


def ask_client_data()-> dict:
    client = {
            'name':_get_client_field('name').capitalize(),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
    return client


if __name__ == '__main__':
    _print_welcome()
    command = input('->').upper()
    print("*"*30)
    list_clients()

    if command == 'C':
        client = ask_client_data()
        create_client(client) 

    elif command == 'D':
        client_id = None
        while True:
            try:
                client_id = int(_get_client_field('id'))
                delete_client(client_id)
                break
            except ValueError:
                print('Type a valid id')
            except IndexError as ie:
                print(ie)
        

    elif command == 'U':
        client_id = None
        while True:
            try:
                client_id = int(_get_client_field('id'))
                assert client_id < len(clients), 'The indx introduced is incorrect'
                updated_client = ask_client_data()
                update_client(client_id, updated_client)
                break
            except ValueError:
                print('Type a valid id')
            except AssertionError as ae:
                print(ae)


    elif command == 'S':
        client_name = _get_client_field('name')
        if search_client(client_name.capitalize()):
            print("The client is in the Client's List")
        else:
            print("The client: {} is not the Client's List".format(client_name))

    elif command == 'L':
        pass 
    else:
        print('Comando inválido')
    

    print(f'\nLista Actualizada:\n{"*"*30}')
    list_clients()
import sys
from typing import KeysView

clients=[
    {
        'name':'pablo',
        'company':'Google',
        'email':'[email protected]',
        'position':'software engineer',
    },
    {
         'name':'ricardo',
         'company':'facebook',
         'email':'[email protected]',
         'position':'Date engineer',  
    },

]


def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the cliente\'s list')


def list_clients():
    #print('{}   {}   {}      {}           {} '.format('id', 'name','company','email','position'))
    for idx,client in enumerate(clients):
        
        print('{}  {}   {}    {}   {}'.format(idx,client['name'],client['company'],client['email'],client['position']))


            

def update_clients(client_name, client):
    global clients
    
    for indice in clients:
        if client_name == indice['name']:
            indice.update(client)
            break
    

def delete_clients(client_name):
    global clients
    i=0
    for indice in clients:
        if client_name in indice['name']:
            i+=1
            clients.remove(indice)
    if i==0:
        print('Client is not in clients list')


def search_client(client_name):
    for indice in clients:
        if indice['name'] !=client_name:
            continue
        else:
            return True


def _get_client_field(field_name):
    field=None

    while not field:
        field=input('What is the client {}: '.format(field_name))
    
    return field


def _get_client_from_user():
    client={
        'name':_get_client_field('name'),
        'company':_get_client_field('company'),
        'email':_get_client_field('email'),
        'position':_get_client_field('position'),
    }
    return client

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('-'*35)
    print('what would you like to do today?')
    print('[C]reate client')
    print('[L]ist client')
    print('[D]elete client')
    print('[U]pdate client')
    print('[S]earch client')


if __name__=='__main__':
    _print_welcome()
    
    command=input()
    command=command.upper()

    if command=='C':
        client=_get_client_from_user()
        create_client(client)
        list_clients()
    elif command=='L':
        list_clients()
    elif command == 'D':
        client_name=_get_client_field('name')
        delete_clients(client_name)
        list_clients()
    elif command == 'U':
        client_name=_get_client_field('name')
        found=search_client(client_name)
        if found:
            client=_get_client_from_user()
            update_clients(client_name,client)
        else:
            print('The client {} is not in our client\'s list'.format(client_name))
        list_clients()    
    elif command == 'S':
        client_name=_get_client_field('name')
        found= search_client(client_name)
        if found:
            print('The client is in the client\'s  list ')
        else:
            print('The client {} is not in our client\'s list'.format(client_name))
    else:
        print('Invalid command')
    

No llama al indice, sino al nombre para el update

import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Sofware Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
    {
        'name': 'Junior',
        'company': 'Bitel',
        'email': '[email protected]',
        'position': 'Electrónico',
    }
]
def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {}?'.format(field_name))
    return field
def _get_client_name():
    client_name = None
    ## 19. While loops
    while not client_name:
        client_name = input('What is the client name? ').strip()
        if client_name == 'exit':
            client_name = None
            break
    if not client_name:
        sys.exit()
    return client_name        

def create_client(client):
	global clients  
	if client not in clients:
		clients.append(client)
	else:
		print('Client already exists')

def update_client(client_name):
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            clients.pop(idx)
            clients.append(input_client())
        else:
            print('Client is not clients list')            
        
def delete_client(client_name):
    global clients
    for idx, client in enumerate(clients):
        if client_name == client['name']:
            clients.pop(idx)
        else:
            print('Client isD not clients list')  

def search_client(client_name):
    ## 18. For loops
    for client in clients:
        if client != client_name:
            continue
        else:
            return True
def input_client():
    client={
            'name': _get_client_field('name'),
            'company':_get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
            }
    return client
    
        
def list_clients(): 
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid =idx, 
            name =client['name'],
            company = client['company'],
            email =client['email'],
            position =client['position']))
def _add_coma():  
	global clients
	clients +=", "

def _print_welcome():
    print ('Welcome to Monares POS')
    print ('*' * 52)
    print ('what would you like to do today?')
    print ('[C]reate client')
    print ('[L]ist client')
    print ('[S]earch client')
    print ('[D]elete client')
    print ('[U]pdate client')

if __name__ == '__main__':
    _print_welcome()
    command = input().lower()
    if command == 'c':
        create_client(input_client())
        list_clients()
    elif command == 'l':
            list_clients()
    elif command == 'u':
        client_name = input('What is the client name? ').strip()
        update_client(client_name)
        list_clients()
    elif command == 'd':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()
    elif command == 's':
        client_name = _get_client_name()
        found = search_client(client_name)
        if found:
            print('The client is in the client\'s list')
        else:
            print(f'The client {client_name} i not in our client\'s list')
    else:
        print('Invalid command')

input()

Reto cumplido

Funciones auxiliares:

def input_create(field):

    field = input('What is the client ' + field + '? ').capitalize()

    return field


def get_id(client_name):

    for idx, client in enumerate(clients):

        if client['name'] == client_name:

            return idx
	

Update:

def update_clients(client):

    global clients

    for i, name_client in enumerate(clients):

        if client != name_client['name']:

            continue

        else:

            new_client = {
                'name': input_create('name'),
                'lastname': input_create('lastname'),
                'company': input_create('company'),
                'email': input_create('email'),
                'position': input_create('position'),
            }

            clients[i] = new_client

    salto_de_linea(), list_updated()

    return clients

Delete:


def delete_client(id, name_client =''):

    global clients

    for id_client, client  in enumerate(clients):

        name = client['name']

        if id_client == id:

            del clients[id]

            print(f'Client {name} deleted successfully!')

    return clients

Opción U y D:

elif user_choose == 'U':
        
        global clients

        user = input('What client you want to update? ').capitalize().strip()

        salto_de_linea()

        for i, client in enumerate(clients):

            if user in client['name'] :

                update_clients(user)

                salto_de_linea()

                read_clients()

            else:

                print('The user is not in the db') #entra siempre cuando cambio el primer cliente porque su indice es 0, lo que es falso, agradecería ayuda



    elif user_choose == 'D':

        question_id = input('Do you know the id client? Y/N ').upper().strip()

        salto_de_linea()

        if question_id == 'Y':

            id_delete = int(input('What is the client id? '))

            salto_de_linea()

            delete_client(id_delete)

            salto_de_linea(), list_updated(), salto_de_linea(),read_clients()

        elif question_id == 'N':

            question_name = input('What is the name of the client? ').capitalize().strip()

            salto_de_linea()

            id_client = get_id(question_name)

            delete_client(id_client)

            salto_de_linea(), list_updated(), salto_de_linea(),read_clients()

        else:

            print('Please enter a valid option')
          

Yo use los nombres para update y delete

import sys


clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data engineer',
    }

]


def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Clinet already is in the client\'s list')


def update_client(client_name):
    global clients
    clients_names = [i.get('name') for i in clients]

    if client_name in clients_names:
        index = clients_names.index(client_name)
        updated_client_dict = {
            'name': _get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position'),
            }
        clients[index] = updated_client_dict
    else:
        print('Client is not in clients list')


def delete_cliente(client_name):
    global clients
    clients_names = [i.get('name') for i in clients]
    if client_name in clients_names:
        index = clients_names.index(client_name)
        clients.pop(index)
    else:
        print('Client is not in clients list')

def search_client(client_name):
    global clients
    clients_names = [i.get('name') for i in clients]

    for client in clients_names:
        if client != client_name:
            continue
        else:
            return True


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(uid = idx + 1, name = client['name'], company = client['company'], email = client['email'], position = client['position']))


def _print_welcome():
    print(' WELCOME TO PLATZI VENTAS '.center(70,'='))
    
    print('[C]reate client')
    print('[L]ist client')
    print('[S]earch client')
    print('[U]pdate client')
    print('[D]elete client')


def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}?'.format(field_name))

    return field


def _get_client_name():
    client_name = None

    while not client_name:
        client_name = input('What is the client name? ')

        if client_name == 'exit':
            client_name = None
            break
        
    if not client_name:
        sys.exit()

    return client_name



if __name__ == '__main__':
    _print_welcome()
    
    command = input('What would you like to do today? ')
    command = command.upper()

    if command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position'),
            }
        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in the client\'s list'.format(client_name))
    elif command == 'D':
        client_name = _get_client_name()
        delete_cliente(client_name)
        list_clients()
    elif command == 'U':
        client_name = _get_client_name()
        
        update_client(client_name)
        list_clients()
    else:
        print('Invalid command')

diccionarios


clients = [
    {
        'name':'pablo',
        'company':'Google',
        'email':'pablo@google',
        'position':'software engineer'

    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': 'ricardo@facebook.com',
        'position': 'Data Engineer',
    }

]

Al actualizarlas a diccionarios, en las tres utilicé bucles for para poder acceder desde la variable i, al nombre de cada diccionario en mi lista. Y proceder a eliminarlo o actualizarlo 🤝

Así hice la función de search:

def search_client(client_name):
    global clients
    idx = 0
    found = None
    for i in clients:
        print
        if client_name == i['name'].lower():
            found = True
        if found:
            print(f'The client: {client_name.capitalize()} is in my database on the index: {idx}')
            break
        if idx == len(clients) - 1:
            print(f'The client: {client_name.capitalize()} is not in my database')
        idx += 1

Así hice la función de delete:

def delete_client(client_name):
    global clients
    found = None
    idx = 0
    for i in clients:
        if i['name'].lower() == client_name:
            print(f'The client: {client_name.capitalize()} has been removed of the index: {idx}')
            clients.remove(i)
            found = True
            break
        if idx == len(clients) - 1:
            print(f'The client: {client_name.capitalize()} is not in my database')
        idx += 1

Así hice la función de update:

def update_client(client_name):
    global clients
    found = None
    idx = 0
    for i in clients:
        if i['name'].lower() == client_name:
            updated_client_name = input('What\'s the new name?: ').strip().lower().capitalize()
            i['name'] = updated_client_name
            i['company'] = _get_client_field('company')
            i['email'] = _get_client_field('email')
            i['position'] = _get_client_field('position')
        if idx == len(clients) - 1:
            print(f'The client: {client_name.capitalize()} is not in my database')
        idx += 1

Sobre el comentario que mencionó el profe, de estar reescribiendo el código todo el tiempo en el mundo real, me parece muy discutible por el principio open-closed de Bertrand Meyer. No deberíamos estar toqueteando a cada rato el código que ya existe y funciona bien. Por eso, hay que hacer un buen levantamiento de requerimientos y de diseño. Ahora, a veces toca por que toca, pero reescribir todo el tiempo, da sensación de un mal diseño en nuestro software.

Mi solución:
Funcion que busca por nombre y retorna si se encontro el cliente y el index en la lista:

def _is_registered(client_name):
    global clients
    index = 0
    back = False

    for element in clients:
        if element['name'] == client_name:
            back = True
            index = clients.index(element)
        else:
            continue
    
    return back,index

Update client:

def update_client(client_name,update_client_name):
    global clients
    back,index = _is_registered(client_name)
    if back:
        for element in clients:
            dic = clients.index(element)
            if dic == index:
                clients[index]={**element,'name':update_client_name} #change value
    else:
        print('Not found')

Delete client:

def delete_client(client_name):
    global clients

    back,index = _is_registered(client_name)
    
    if back:
        clients.pop(index)
    else:
        print('Not found')

** Search client:**

def search_client(client_name):
    global clients
    # clients_list = clients.split(',') #Crea una lista separada por las comas
    back,index = _is_registered(client_name)
    if back:
        return back
    else:
        return False
import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer'
    },
    {
       'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data engineer' 
    }
]

def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')

def list_clients():
    for idx, client in enumerate(clients):
        print(f"{idx} | {client['name']} | {client['company']} | {client['email']} | {client['position']}")

def update_client(client_id, updated_client):
    global clients
    if len(clients) - 1 >= client_id:
        clients[client_id] = updated_client
    else:
        dont_exist()

def delete_client(client_id):
    global clients

    for idx, client in enumerate(clients):
        if idx == client_id:
            del clients[idx] 
            break
        
def search_client(client_name):
    for client in clients:
        if client['name'] != client_name:
            continue
        else:
            return True

def dont_exist():
    return 'Client is not in clients list'


def _get_client_field(field_name):
    field = None
    while not field:
        field = input(f'what is the client {field_name}?: ')
    return field
    

def _get_client_from_user():
    client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position'),
    }

    return client

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would you like to do today?')
    print('[C]reate Client')
    print('[L]ist Client')
    print('[D]elete Client')
    print('[U]pdate Client')
    print('[S]earch Client')

if __name__ == '__main__':
    _print_welcome()
    command = input()
    command = command.upper()

    if command == 'C':
        client = _get_client_from_user()

        create_client(client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'U':
        client_id = int(_get_client_field('id'))
        updated_client = _get_client_from_user()

        update_client(client_id, updated_client)
        list_clients()
    elif command == 'D':
        client_id = int(_get_client_field('id'))

        delete_client(client_id)
        list_clients()
    elif command == 'S':
        client_name = _get_client_field('name')
        found = search_client(client_name)
        
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))
    else:
        print('Invalid command')

Así resolví el reto:

import sys

clients = [
  {
    'name': 'Pablo',
    'company': 'Google',
    'email': '[email protected]',
    'position': 'Software engineer',
  },
  {
    'name': 'Ricardo',
    'company': 'Facebook',
    'email': '[email protected]',
    'position': 'Data engineer',
  }
]

def _get_client_field(field_name):
  field = None

  while not field:
    field = input(f'What is the client {field_name}?: ')
  return field


def create_client(client):
  global clients

  if client_name not in clients:
    clients.append(client)
  else:
    print('client is already is the client\'s list')


def list_clients():
  for idx, client in enumerate(clients):
    print(f'{idx} | {client["name"]} | {client["company"]} | {client["email"]} | {client["position"]}')


def update_client(client_name, updated_client_name, updated_company, updated_email, updated_position):
  global clients

  for i in clients:
    for key,value in i.items():
      if client_name == i['name']:
        i.update([('name', updated_client_name), ('company', updated_company), ('email', updated_email), ('position', updated_position)])
    else:
      client_not_found()
  return clients


def delete_client(client_name):
  global clients

  for client in clients:
    for key,value in client.items():
      if client_name == client[key]:
        clients.remove(client)


def search_client(client_name):
  for client in clients:
    for key,value in client.items():
      if client_name == client['name']:
        print(client.items())
        break


def client_not_found():
  print('Client is not in clients list')


def _get_client_name():
  client_name = None

  while not client_name:
    client_name = input('What is the client name?: ')
    if client_name == 'exit':
      client_name = None
      break
  if not client_name:
    sys.exit()
  return client_name


def _print_welcome():
  print('WELCOME TO PLATZI SALES')
  print('*' * 50)
  print('[C]reate client')
  print('[R]ead clients')
  print('[U]pdate client')
  print('[D]elete client')
  print('[S]earch client')
  print('[E]xit program')


if __name__ == '__main__':
  _print_welcome()

  command = input('What would you like to do today?: ')
  command = command.upper()


  if command == 'C':
    client = {
      'name': _get_client_field('name'),
      'company': _get_client_field('company'),
      'email': _get_client_field('email'),
      'position': _get_client_field('position'),
    }
    create_client(client)
    list_clients()
  elif command == 'R':
    list_clients()
  elif command == 'U':
    client_name = _get_client_name()
    updated_client_name = input('What is the updated client name?: ')
    updated_company = input('What is the updated company name?: ')
    updated_email = input('What is the updated email?: ')
    updated_position = input('What is the updated position?: ')
    update_client(client_name, updated_client_name, updated_company, updated_email, updated_position)
    list_clients()
  elif command == 'D':
    client_name = _get_client_name()
    delete_client(client_name)
    list_clients()
  elif command == 'S':
    client_name = _get_client_name()
    found = search_client(client_name)
  elif command == 'E':
    sys.exit()
  else:
    print('Invalid command')

Un format más sencillo y elegante:

def list_clients():
  for idx, client in enumerate(clients):
    print(f'{idx} | {client["name"]} | {client["company"]} | {client["email"]} | {client["position"]}')

Update, delete and search.

IMPORTANTE Si estan utilizando el print(f"") y les da error este tipo de sentencia

def list_clients():
    global clients
    for i, k in enumerate(clients['name']):
        print(f'{i}, {k['name']}')```

###
Eliminen el f'' para trabajar unicamente con los iteredores de esta forma pudes te quedara de la siguiente forma:

def list_clients():
    global clients
    for i, k in enumerate(clients['name']):
        print(i, k['name'])

Les comparto la versión de mi código con las opciones de Delete y Update que implementé.

# Utilities
import sys

clients = [
        {
            'name': 'Daniel',   
            'company': 'Google',
            'email': '[email protected]',
            'position': 'Software Engineer'
        },
        {
            'name': 'Ricardo',
            'company': 'Facebook',
            'email': '[email protected]',
            'position': 'Data Engineer'
        }
    ]
            

def create_client(client_name, client_company, client_email, client_position):
    global clients

    new_client = {
        'name': client_name,
        'company': client_company,
        'email': client_email,
        'position': client_position
    }

    if new_client not in clients:
        clients.append(new_client)
    else:
        print('Client already is in the client\'s list')

def _get_client_index(name):
    global clients
    client_index = None
    for idx,client in enumerate(clients):
        if client.get('name') == name:
            client_index = idx

    return client_index


def list_clients():
    global clients
    
    for client in clients:
        print(
                'Name: {} - Company: {} - Email: {} - Position: {}'.format(
                    client['name'], 
                    client['company'], 
                    client['email'], 
                    client['position']
                ))


def update_client(client_name):
    global clients
    client_index = _get_client_index(client_name)

    if client_index is not None:
        _update_field('name', client_index)
        _update_field('company', client_index)
        _update_field('email', client_index)
        _update_field('position', client_index)
    else:
        print('{} is not in the clients list'.format(client_name))


def _update_field(field, client_index):
    global clients
    user_option = None
    
    while user_option not in ['N', 'Y']:
        user_option = input('Do you want to update the {} field? (Y/N): '.format(field)).upper()
        print(user_option)
        if user_option == 'Y':
            clients[client_index][field] = input('Enter the new {}: '.format(field))
        elif user_option == 'N':
            break
        else:
            print('{} is not a valid option'.format(user_option)) 
    

def delete_client(client_name):
    global clients
    client_index = _get_client_index(client_name)

    if client_index is not None:
       clients.pop(client_index)
    else:
        print('client is not in clients list')


def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[U]pdate')
    print('[D]elete client')
    
def _get_client_field(client_field):
    list_of_fields = ['name', 'company', 'email', 'position']
    
    if client_field in list_of_fields:
        return input('What is the client {}?: '.format(client_field))
    else:
        return '{} field is not in the list of fields for a client'.format(client_field)


if __name__ == '__main__':
    _print_welcome()
    command = input()
    command = command.upper()
    if command == 'C':
        # Set client fields
        client_name = _get_client_field('name')
        client_company = _get_client_field('company')
        client_email = _get_client_field('email')
        client_position = _get_client_field('position')

        # Create client and print the list of clients
        create_client(client_name, client_company, client_email, client_position)
        list_clients()
    elif command =='D':
        # Delete a client from the clients list
        client_name = _get_client_field('name')
        delete_client(client_name)
        list_clients()
    elif command == 'U':
        client_name = _get_client_field('name')
        update_client(client_name)
        list_clients()
    else:
        print('Invalid command')

Reto cumplido

clients = [
    {
        'name': 'fredy',
        'email': '[email protected]',
        'company': 'platzi',
        'position': 'ceo'
    },
]


def create_clients():
    global clients
    print('*-----*  Create Client  *-----*')
    client_name = _get_client_field('name: ')
    for client in clients:
        if client['name'].lower() == client_name.lower():
            print('')
            print('{} is already on the client list'.format(client['name']))
            break
    else:
        client = {
            'name': client_name,
            'email': _get_client_field('email: '),
            'company': _get_client_field('company: '),
            'position': _get_client_field('position: ')
        }
        clients.append(client)
        print('')
        print('Client added successfully')
    _decorate()


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print('')
        print('{}'.format(str(idx + 1)))
        _print_client_data(client)


def search_client(message):
    global clients
    client_to_find = input(message)
    for client in clients:
        if client['name'].lower() == client_to_find.lower():
            _print_client_data(client)
            return client
    else:
        print('')
        _client_not_found(client_to_find)
        return client_to_find


def delete_client():
    global clients
    print('*----*  Delete Client  *----*')
    client_to_delete = search_client('Client name to delete: ')
    if client_to_delete in clients:
        clients.remove(client_to_delete)
        print('')
        print('Client deleted successfully')
    _decorate()


def update_client():
    global clients
    print('*----*  Update Client  *----*')
    client_to_update = search_client('Name of the client to update: ')
    for client in clients:
        if client_to_update not in clients:
            break
        elif client['name'] == client_to_update['name']:
            print('')
            update_name = input('Enter a new name: ')
            client['name'] = update_name
            question_email = input('Do you want to update mail? Y/N: ')
            if question_email.upper() == 'Y':
                update_email = input('Enter a new email: ')
                client['email'] = update_email
            question_company = input('Do you want to update company? Y/N: ')
            if question_company.upper() == 'Y':
                update_company = input('Enter a new company: ')
                client['company'] = update_company
            question_position = input('Do you want to update position? Y/N: ')
            if question_position.upper() == 'Y':
                update_position = input('Enter a new position: ')
                client['position'] = update_position
            _print_client_data(client)
            print('')
            print('Client updated successfully')
            break
    _decorate()


def _print_client_data(client):
    print('  ' + client['name'])
    print('  ' + client['email'])
    print('  ' + client['company'])
    print('  ' + client['position'])


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is client {}'.format(field_name))
    return field


def _decorate():
    print('')
    print('*---*' * 6)


def _client_not_found(name):
    print('{} is not in client list'.format(name))


def run():
    print('WELCOME TO CLIENT\'S DATABASE')
    print('*' * 25)
    print('What do you want to do today?')

    while True:
        command = input('''Choose an option:
    [1] Create client
    [2] Update Client
    [3] List Clients
    [4] Delete client
    [5] Search client
    [x] exit
    ''')

        if command == '1':
            create_clients()
        elif command == '2':
            update_client()
        elif command == '3':
            print('*-------*  Clients  *-------*')
            list_clients()
            _decorate()
        elif command == '4':
            delete_client()
        elif command == '5':
            print('*----*  Search Clients  *----*')
            search_client('Name client: ')
            _decorate()
        elif command.lower() == 'x':
            break
        else:
            _decorate()
            print('')
            print('  ' + '  ' + 'Invalid option')
            _decorate()


if __name__ == '__main__':
    run()

MI VERSIÓN DE CÓDIGO, ME HE SALIDO UN POCO DE LO QUE EL PROFE DAVID ESTÁ HACIENDO, ME HE COMPLICADO MÁS MI VIDA, PERO ME HA HECHO MÁS DIVERTIDA LA EXISTENCIA. :3

import sys

clients = [
    {
        'name': 'aldo',
        'ocupation': 'estudiante',
        'cell': '961-165-4631',
    },
    {
        'name': 'adriana',
        'ocupation': 'ama de casa',
        'cell': '961-413-1641',
    },
    {
        'name': 'eliseo',
        'ocupation': 'empleado',
        'cell': '961-123-1234',
    }
]

for i in range(len(clients)):
    clients[i]['name'] = clients[i]['name'].capitalize()
    clients[i]['ocupation'] = clients[i]['ocupation'].capitalize()

def _print_welcome():
    print('||""""""""""""""""""""""""""""""""||')
    print('||----WELCOME TO SALES PROJECT----||')
    print('||________________________________||')

def _print_menu():
    print('||----------------------------------')
    print('||> What would you like to do today?')
    print('||----------------------------------')
    print('||-(C)reate client')
    print('||-(U)pdate client')
    print('||-(D)elete client')
    print('||-(S)earch client')
    print('||-(L)ist client')
    print('||-(E)xit')
    print('||----------------------------------')

def create_client(client):
    global clients
    ind = len(clients)
    validate = 0
    
    for idx in range(ind):
        if client['name'] == clients[idx]['name']:    
            _error('CLIENT IN LIST',client['name'])
            validate = 1
    if validate != 1:
        new_client = _get_client('NEW')
        client.update(new_client)
        clients.append(client)
    return_to('CREATE CLIENT') 

def update_client(client):
    global clients
    ind = len(clients)
    validate = 0

    for idx in range(ind):
        if client['name'] == clients[idx]['name']:    
            update_client_name = _get_client('UPDATE NEW')
            clients[idx] = update_client_name
            validate = 1
    if validate != 1:
        _error('CLIENT NOT LIST',client['name'])
    return_to('UPDATE CLIENT')
        
def delete_client(client):
    global clients
    ind = len(clients)
    validate = 0

    for idx in range(ind):
        if client['name'] == clients[idx]['name']:    
            clients.remove(clients[idx])
            validate = 1
            break
    if validate != 1:
        _error('CLIENT NOT LIST',client['name'])
    return_to('DELETE CLIENT')

def search_client(client):
    global clients
    ind = len(clients)
    validate = 0

    for idx in range(ind):
        if client['name'] == clients[idx]['name']:
            name= clients[idx]['name']
            ocupation = clients[idx]['ocupation']
            cell = clients[idx]['cell']
            print(f'||- - - - - - - - - - - -| Index: {idx}')
            print(f'||===> {name}' )
            print(f'||--> {ocupation}' )
            print(f'||--> {cell}' )
            validate = 1
    if validate != 1:
        _error('CLIENT NOT LIST',client['name'])
    return_to('SEARCH CLIENT')

def return_to(submenu):
    if submenu != 'ERROR':
        print('||----------------------------------')
        print('||> What would you like to do now?')
        print('||----------------------------------')
        print('||-(C)ontinue this activity')
        print('||-(R)eturn main menu')
        print('||-(E)xit')
        print('||----------------------------------')
        option = input('||> Select >> ')
        option = option.upper()
    
        if option == 'C':
            if submenu == 'CREATE CLIENT':
                client = _get_client('UPDATE OLD')
                create_client(client)
            elif submenu == 'UPDATE CLIENT':
                client = _get_client('UPDATE OLD')
                update_client(client)   
            elif submenu == 'DELETE CLIENT':
                client = _get_client('UPDATE OLD')
                delete_client(client)
            elif submenu == 'SEARCH CLIENT':
                client = _get_client('UPDATE OLD')
                search_client(client)  
        elif option == 'R':
            main_menu()
        elif option == 'E':
            sys.exit()
        else:
            _error('INVALID COMMAND','')
    else:
        print('||----------------------------------')
        print('||> What would you like to do now?')
        print('||----------------------------------')
        print('||-(R)eturn main menu')
        print('||-(E)xit')
        print('||----------------------------------')
        option = input('||> Select >> ')
        option = option.upper()
        if option == 'R':
            main_menu()
        elif option == 'E':
            sys.exit()
        else:
            _error('INVALID COMMAND','')

def _get_client(option):
    if option == 'NEW':
        client = {
            'ocupation': _get_client_field('ocupation','NEW'),
            'cell': _get_client_field('cell','NEW'),
        }
    elif option == 'UPDATE OLD':
        client = {
            'name': _get_client_field('name','NEW'),
        }
    elif option == 'UPDATE NEW':
        client = {
            'name': _get_client_field('name','UPDATE'),
            'ocupation': _get_client_field('ocupation','UPDATE'),
            'cell': _get_client_field('cell','UPDATE'),
        }
    return client

def _get_client_field(field_client,option):
    field = None
    while not field:
        if option == 'NEW':
            field = input(f'||----------------------------------\n||> What is the client {field_client}: ').capitalize()
            if field == 'No':
                field = None
                break
        elif option == 'UPDATE':
            field= input(f'||----------------------------------\n||> What is the update client {field_client}: ').capitalize()
            if field == 'No':
                field = None
                break
    if not field:
        main_menu()
    return field
    
def _list_clients():
    global clients
    print('||================================||')
    print('||-------##-List Clients-##-------||')
    print('||================================||')

    for idx,client in enumerate(clients):
        name= client['name']
        ocupation = client['ocupation']
        cell = client['cell']
        print(f'||- - - - - - - - - - - -| Index: {idx}')
        print(f'||===> {name}' )
        print(f'||--> {ocupation}' )
        print(f'||--> {cell}' )
    
    return_to('ERROR')

def _error(type_error,client_name):

    if type_error == 'INVALID COMMAND':
        print("||")
        print('||============ERROR 00============||')
        print('||-----##-Invalid  command-##-----||')
        print('||================================||')
        return_to('ERROR')
    elif type_error == 'CLIENT NOT LIST':
        print("||")
        print('||- - - - - - - - - - -> WARNING 01')
        print(f'||>>> The client: {client_name} ,is not in list')
        print('||- - - - - - - - - - - - - - - - -')
    elif type_error == 'CLIENT IN LIST':
        print("||")
        print('||- - - - - - - - - - -> WARNING 02')
        print(f'||>>> The client: {client_name} ,is in list')
        print('||- - - - - - - - - - - - - - - - -')
    else:
        pass

def main_menu():
    if __name__ == '__main__':
        _print_menu()

        command = input("||> Select >> ")
        command = command.upper()

        if command == 'C':
            client = _get_client('UPDATE OLD')
            create_client(client)
        elif command == 'U':
            client = _get_client('UPDATE OLD')
            update_client(client)       
        elif command == 'D':
            client = _get_client('UPDATE OLD')
            delete_client(client)
        elif command == 'S':
            client = _get_client('UPDATE OLD')
            search_client(client)            
        elif command == 'L':
            _list_clients()
        elif command == 'E':
            sys.exit()
        else:
            _error('INVALID COMMAND','')

_print_welcome()
main_menu()

Asi va el proyecto

import sys

clients = []

def _get_client_field(field):
    """ Recibimos un nombre de campo y devolvemos un valor para ese campo """
    client_field = None
    
    while not client_field:
        client_field = input('Enter customer {} (exit, para salir): '.format(field))
        if client_field == 'exit':
            client_field = None
            break
    
    if not client_field:
        sys.exit()
    else:
        return client_field


def list_clients():
    global clients
    
    # Vamos a iterar en la lista e imprimir el indice y el contenido
    for k, v in enumerate(clients):
        print('{idx}: {name} : {dir}, {email}. Telefono: {tel}'.format(
                idx = k,
                name = v['name'],
                dir = v['direction'],
                email = v['email'],
                tel = v['tel']
                ))


def create_clients():
    global clients
    client = dict()
    
    client['name'] = _get_client_field('name')
    client['direction'] = _get_client_field('direction')
    client['email'] = _get_client_field('email')
    client['tel'] = _get_client_field('tel')
    
    clients.append(client)
    

def delete_client(client_name):
    global clients
    present = False
    
    for i in clients:
        if client_name in i.get('name'):
            clients.remove(i)
            present = True
            break
    return(present)    

    
def update_client(client_name, update_name):
    global clients
    present = False
    
    for i in clients:
        if client_name in i.get('name'):
            i['name'] = _get_client_field('name')
            i['direction'] = _get_client_field('direction')
            i['email'] = _get_client_field('email')
            i['tel'] = _get_client_field('tel')
            present = True
            break
    return(present) 

    
def menu():
    print("""
       CLIENTES
       ========
       [A]dd client
       [D]elete client
       [U]pdate client
       [L]ist clients
       
       [Q]uit program
       
    """)

if __name__ == '__main__':
    
    exit = False
    
    while not exit:
        menu()
        command = input('Command: ')
        command = command.upper()
        if (command == 'A'):
            create_clients()
        elif command == 'D':
            client_name = _get_client_field('name')
            if not delete_client(client_name):
                print('Client is not in list')
        elif command == 'U':
            client_name = _get_client_field('name')
            if not update_client(client_name):
                print('Client is not in list')
        elif command == 'L':
            list_clients()
        elif command == 'Q':
            exit = True
        else:
            print('Command not defined')```

Esta es una diferencia con el codigo del profe actualizo aprtir del nombre cliente obteniendo el index

<def update_client(client_name,update_client):
    global Clients
    client_name_index= next((index for (index, client) in enumerate(clients) if client['name']==client_name),-1)
    if client_name_index >= 0:
        clients[client_name_index] = updated_client
    else:
        print('Client No exist')>
import os
clients = []


def input_data(client,key):
    client[key] = None
    while not client[key]:
        client[key] = input('Por favor ingrese {llave} de cliente\n'.format(
            llave = key
        ))
    

def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {apellido}'.format(
            uid = idx,
            name = client['nombre'],
            apellido = client['apellido']))

def delete_clients():
    list_clients()
    cliente_e = input('ingrese el nombre del cliente que desea eliminar\n')            
    for idx, client in enumerate(clients):
        if cliente_e == client['nombre']:
            del clients[idx]
            print('cliente eliminado')

def edit_clients():
    list_clients()
    cliente_e = input('ingrese el nombre del cliente que desea editar\n')            
    for idx, client in enumerate(clients):
        if cliente_e == client['nombre']:
            input_data(client,'nombre')
            input_data(client,'apellido')
            print('cliente modificado')

if __name__ == '__main__':
    opc =''
    while opc != 'Z':
        os.system('cls')
        print('Hola, que te gustaria realizar el dia de hoy?')
        print('*'*50)
        print('[C] Crear usuario')
        print('[E] Editar usuario')
        print('[L] Listar usuarios')
        print('[D] Eliminar usuario')
        print('[Z] Salir')
        print('*'*50)
        
        opc = input()
        opc = opc.upper()

        if opc == 'C':

                os.system('cls')
                client = {}
                input_data(client,'nombre')
                input_data(client,'apellido')
                clients.append(client)
                os.system("Pause")
            
                

        elif(opc == 'E'):
            os.system('cls')
            edit_clients()
            os.system("Pause")

        elif(opc == 'L'):            
            os.system('cls')
            list_clients()
            os.system("Pause")


        elif(opc == 'D'):
            os.system('cls')
            delete_clients()
            os.system("Pause")
        
        elif(opc == 'Z'):
            break
        else:
            print('opcion invalida')
            os.system("Pause")

bueno no lo hice completo como en el curso pero, creo que mas o menos empece a comprender el lenguaje.

No me la creo, hice la tarea 😃

import sys

clients = [
    {
        'name':'pablo',
        'company':'google',
        'email': '[email protected]',
        'position':'software engineer',
    },{
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'data engineer',
    }
]

def create_cliente(client):
    global clients

    if client not in clients:
        clients.append(client)
    else:
        print('client already exists')

def list_clients():
    for idx, client in enumerate(clients):
        print('{} | {} | {} | {} | {}'.format(idx, client['name'],client['company'],client['email'],client['position']))


def _get_index_client_for_field(field_name,field_value):
    indice = -1
    for idx, client in enumerate(clients):
        if field_value == client[field_name]:
            indice = idx
            break
    return indice


def update_client(client_name, update_client):
    global clients
    indice = _get_index_client_for_field('name',client_name)
    if indice >= 0:
        clients[indice] = update_client
    else:
        print('the client no in  list clients')


def _print_welcome():
    print('BIENVENIDO A PLATZY VENTAS')
    print('*'*50)
    print('What would you like to do today')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]ource client')
    print('[L]ist client')


def delete_client(client_name):
    global clients
    index = _get_index_client_for_field('name',client_name)
    if index >=0:
        clients.pop(index)
    else:
        print('Client not in clients list')


def _get_client_field(field_name):
    name_field = None
    while not name_field:
        name_field= input('What is the {} name'.format(field_name))

    return name_field

def _get_client_name():
    aux_name = None
    while not aux_name:
        aux_name = input('What is the client name?')
        if aux_name == 'exit':
            aux_name=None
            break
    if not aux_name:
        sys.exit()
    return aux_name


def source_client(client_name):
    global clients

    for client in clients:
        if client_name == client['name']:
            return True


def create_client_obj():
    client = {
            'name' : _get_client_field('name'),
            'company' : _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position'),
        }
    return client


if __name__== '__main__':
    _print_welcome()
    
    command = input()
    command = command.upper()
    if command == 'C':
        client = create_client_obj()
        create_cliente(client)
        list_clients()
    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)
        list_clients()
    elif command == 'U':
        client_name = _get_client_name()
        print('Write the values to modify client')
        updated_client = client = create_client_obj()
        update_client(client_name, updated_client)
 
        list_clients()
    elif command == 'S':
        client_name = _get_client_name()
        found = source_client(client_name)
        if found:
            print('The client is in the client\'s list')
        else:
            print('the client: {} is not in our client\'s list'.format(client_name))
    elif command == 'L':
        list_clients()
    else:
        print('Invalid command')

No es redundante guardar los datos de esta manera, parece como que gasta mucha memoria en cada usuario:

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Sofware Engineer',
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer',
    },
]```

Mi solución

import sys
clients =[
	{
		'name':'Emanuel',
		'company':'Maxcom',
		'email':'[email protected]',
		'position':'Ing Switch',
	},
	{
		'name':'Mauricio',
		'company':'ESCA',
		'email':'[email protected]',
		'position':'Contador',
	},	{
		'name':'Angelica',
		'company':'Espressate',
		'email':'[email protected]',
		'position':'Barista',
	},	{
		'name':'Virginia',
		'company':'Migdal',
		'email':'[email protected]',
		'position':'Arquitecto',
	},
]


def create_client(client):
	global clients
	if client not in clients:
		clients.append(client)
	else:
		print('Client already in list')


def delete_client(client_name):
	global clients
	for client in clients:
		if client['name'] == client_name:
			clients.remove(client)
			print('Client deleted!!!')
			return True
	print('Client not in list')

def search_client(client_name):
	global clients
	for client in clients:
		if client['name'] == client_name:
			return client
	return None

def list_clients():
	global clients
	for idx, client in enumerate(clients):
		print('{uid} | {name} | {company} | {email} | {position}'. format(uid=idx,name=client['name'],company=client['company'], email=client['email'],position=client['position']))

def update_client(client_name):
	global clients
	for idx, client in enumerate(clients):
		if client['name'] in client_name:
			new_client = {
				'name': _update_client_field('new name',client['name']),
				'company': _update_client_field('new company',client['company']),
				'email': _update_client_field('new email',client['email']),
				'position': _update_client_field('new position',client['position'])
			}
			clients[idx]=new_client
			return True
	print('Client is not in list')	


def _print_welcome():
	print('WELCOME TO PLATZI VENTAS')
	print('*' * 50)
	print('What u want bitch?')
	print('[C]reate client')
	print('[U]pdate client')
	print('[D]elete client')
	print('[S]earch client')

def _get_client_field(field_name):
	field = None
	while not field:
		field = raw_input('Client {}???'.format(field_name))
	return field

def _update_client_field(field_name, old_value):
	field = raw_input('New client {}??? ({})'.format(field_name,old_value))
	if not field:
		return old_value
	else:	
		return field


if __name__  == '__main__':
	_print_welcome()
	command = raw_input()
	command = command.upper()
	
	if command == 'C':
		client = {
			'name': _get_client_field('name'),
			'company': _get_client_field('company'),
			'email': _get_client_field('email'),
			'position': _get_client_field('position')
		}
		create_client(client)
		list_clients()
	elif command == 'D':
		client_name = _get_client_field('name')
		delete_client(client_name)
		list_clients()
	elif command == 'U':
		client_name = _get_client_field('old name')
		update_client(client_name)
		list_clients()
	elif command == 'S':
		client_name = _get_client_field('name')
		found = search_client(client_name)
		if found:
			print(' {name} | {company} | {email} | {position}'. format(name=found['name'],company=found['company'], email=found['email'],position=found['position']))
		else:
			print('Client {} DOES NOT exists!!!'.format(client_name));
	else:
		print('Invalid command')
	
	

Hola compañeros comparto mi codigo, cree un par de funciones para recibir datos, y validar si esta o no el cliente antes de enviar los datos para eliminar o actualizar.

import sys
clients = [
	{
		'name' : 'Pablo',
		'company' : 'Google',
		'email' : '[email protected]',
		'position' : 'Software engineer'
	},
	{
		'name' : 'Ricardo',
		'company' : 'Facebook',
		'email' : '[email protected]',
		'position' : 'Data engineer'
	}
]

def create_client(name):
	global clients
	if client not in clients:
		clients.append(client)
	else:
		print('Client already is in the client\'s list ')
	#print(clients)


def list_clients():
	global clients
	for idx, client in enumerate(clients):
		print('{uid} | {name} | {company} | {email} | {position}'.format(
			uid=idx,
			name = client['name'],
			company = client['company'],
			email = client['email'],
			position = client['position']))
		#print('{} : {}'.format(idx, client['name']))
	

def update_client(client_name, client):
	global clients
	index = None
	for i in clients:
		if client_name == i['name']:
			index = clients.index(i)
			clients[index] = client
			break
	if index == None:
		_not_client_list_message(client_name)

def delete_client(client_name):
	global clients
	index = None
	#print(list)
	for i in clients:
		if client_name == i['name']:
			index = clients.index(i)
			del clients[index]
			break
	#if index == None:
	#	_not_client_list_message(client_name)


def search_client(client_name):
	global clients
	for client in clients:
		if client != client_name:
			continue
		else:
			return True


def _print_welcome():
	print('WELCOME TO PLATZI VENTAS')
	print('*' * 50)
	print('What would you like to do today?')
	print('[C]reate client')
	print('[L]ist client')
	print('[U]pdate client')
	print('[D]elete client')
	print('[S]earch client')


def _get_client_field(field_name):
	field = None
	while not field:
		field = input('What is the client {}?'.format(field_name))
		return field


def _get_client_name():
	client_name = None
	while not client_name:
		client_name =  input('What is the client name:.? ')
		if client_name == 'exit':
			client_name = None
			break
	if not client_name:
		sys.exit()
	else:
		return client_name


def _is_client_in_list(client_name):
	verificacion = None
	for i in clients:
		if client_name == i['name']:
			verificacion = True
			break
		else:
			verificacion = False
	return verificacion

def _not_client_list_message(client_name):
	return print('The client {} is not in the client\'s list'.format(client_name))

def _get_client_data():
	client = {
			'name' : _get_client_field('name'),
			'company' : _get_client_field('company'),
			'email' : _get_client_field('email'),
			'position' : _get_client_field('position'),
		}
	return client


if __name__ == '__main__':
	_print_welcome()
	
	command = input(':.')
	command = command.upper()

	if command == 'C':
		client =_get_client_data()
		#list_clients()
		create_client( client )
		list_clients()

	elif command == 'L':
		list_clients()
	elif command == 'D':
		list_clients()
		client_name = _get_client_name()
		if(_is_client_in_list(client_name)):
			delete_client( client_name )
			list_clients()
		else:
			_not_client_list_message(client_name)
	elif command == 'U':
		list_clients()
		client_name = _get_client_name()
		if(_is_client_in_list(client_name)):
			client = _get_client_data()
			update_client( client_name, client )
			list_clients()
		else:
			_not_client_list_message(client_name)
		
	elif command == 'S':
		client_name = _get_client_name()
		found = search_client(client_name)
		if found:
			print('The client {} is in the client\'s list'.format(client_name))
		else:
			_not_client_list_message(client_name)
	else:
		print('Ivalid command')
	

	
	#print(clients)

Mi solucion ;D

import sys
clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Enginner'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Enginner'
    }

]

def create_client(client):
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position} '.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))


def update_client(client_name):
    for i in range(len(clients)):
        if client_name == clients[i]['name']:
            print('The named client will be edited \'{}\' and id \'{}\''.format(client_name,i))

            client = {
                'name': _get_client_field('name'),
                'company': _get_client_field('company'),
                'email': _get_client_field('email'),
                'position': _get_client_field('position')
            }

            clients[i]['name'] = client['name']
            clients[i]['company'] = client['company']
            clients[i]['email'] = client['email']
            clients[i]['position'] = client['position']
            print('The customer has been modified to the name of {}'.format(client['name']))


def delete_client(name):
    for i in range(len(clients)):
        if name == clients[i-1]['name']:
            del clients[i-1]
            print('The client {} has remove'.format(name))
            break
    else:
        _not_found()


def search_client(client_name):
    for i in range(len(clients)):
        if client_name != clients[i]['name']:
            continue
        else:
            return True


def _not_found():
    print('Client is not in clients list')


def _print_welcome():
    print('WELCOME TO THE APP')
    print('*' * 50)
    print('What whould you like to do today?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_name():
    client_name = None
    while not client_name:
        client_name = input('What is the client name? ')
        if client_name =='exit':
            client_name = None
            break
    if not client_name:
            sys.exit()

    return client_name


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {} ? '.format(field_name))

    return field


if __name__ == '__main__':
    _print_welcome()
    command = input()



    if command == 'c' or command == 'C':
        client = {
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position')
        }
        create_client(client)
        list_clients()

    elif command == 'd' or command == 'D':
        client = _get_client_name()
        delete_client(client)
        list_clients()

    elif command == 'u' or command == 'U':
        client_name = input('What customers do you want to edit? ')
        update_client(client_name)
        list_clients()

    elif command == 's' or command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)
        if found:
            print('The Client is in the client\'s list')
        else:
            print('The client: {} is not in our client\'s list'.format(client_name))
    else:
        print('Invalid Command')

la función list_clients

    for idx, client in enumerate(clients):
        print('{} , {} '.format(idx, clients))

solo funciona con diccionarios no, con listas

aqui esta mi version con el desafio resuelto

import sys

clients = [
    {
        'name':'pablo',
        'company':'Google',
        'email':'[email protected]',
        'position':'Software egineer'
    },
    {
        'name':'ricardo',
        'company':'Facebook',
        'email':'[email protected]',
        'position':'Data egineer'
    }
]


def create_client(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print('{uid}|{name}|{company}|{email}|{position}'.format(uid=idx, name=client['name'], company=client['company'], email=client['email'], position=client['position']))


def update_client(uid):
    global clients
    vldtr = 0
    for idx, client in enumerate(clients):
        if uid == idx:
            clients[uid] = _insert_client_data()
            vldtr = 1
            break
    if vldtr == 0:
        print('Client is not in client\'s list')


def delete_client(uid):
    global clients
    vldtr = 0
    for idx, client in enumerate(clients):
        if uid == idx:
            clients.pop(uid)
            vldtr = 1
            break
    if vldtr == 0:
        print('Client is not in clients list')


def search_client(uid):
    global clients
    for idx, clients in enumerate(clients):
        if idx != uid:
            continue
        else:
            return True


def _print_welcome():
    print(' WELCOME TO SOMA VENTAS')
    print('*'*35)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[L]ist client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None
    while not field:
        field =input('What is the client {}? '.format(field_name))
        return field


def _insert_client_data():
    client = {
        'name':_get_client_field('name'),
        'company':_get_client_field('company'),
        'email':_get_client_field('email'),
        'position':_get_client_field('position')
    }
    return client


def _get_client_uid():
    client_uid = None
    while not client_uid:
        client_uid =input('What is the client\'s id? ')
        if client_uid == 'exit':
            client_uid = None
            break
    if not client_uid:
        sys.exit()
    return int(client_uid)


if __name__ == '__main__':
    _print_welcome()
    command = input()
    command = command.upper()

    if command == 'C':
        create_client(_insert_client_data())
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'D':
        delete_client(_get_client_uid())
        list_clients()
    elif command == 'U':
        update_client(_get_client_uid())
        list_clients()
    elif command == 'S':
        client_uid = _get_client_uid()
        found = search_client(client_uid)
        if found:
            print('Client is in the client\'s list')
        else:
            print('the client: {} is not in our client\'s list'.format(client_uid))
    else:
        print('Invalid command')
    

Éste es mi código del reto

import sys

clients = [
    {
        'name': 'Pablo',
        'company': 'Google',
        'e-mail': '[email protected]',
        'position': 'Software engineer'
    },
    {
        'name': 'Ricardo',
        'company': 'Facebook',
        'e-mail': '[email protected]',
        'position': 'Data engineer'
    }
]

def _print_welcome():
    print(('*' * 17) + ('WELCOME PLATZERS') + ('*' * 17))
    print('*' * 50)
    print('-' * 50)
    print('-' * 14, 'WHAT DO U WANNA DO?', '-' * 15)
    print('-' * 17, '[c]reate client', '-' * 16)
    print('-' * 17, '[l]ist clients', '-' * 17)
    print('-' * 17, '[u]pdate client', '-' * 16)
    print('-' * 17, '[d]elete cilent', '-' * 16)
    print('-' * 17, '[s]earch client', '-' * 16)
    print('-' * 50)


def list_clients():
    global clients
    for idx, client in enumerate(clients):
        print(" {uid} | {name} : \n {company} | {email} | {position} ".format(
        uid = idx,
        name = client['name'],
        company = client['company'],
        email = client['e-mail'],
        position = client['position']
        )
    )


def add_cliente(client):
    global clients
    if client not in clients:
        clients.append(client)
    else:
        print(client, "already exists")


def updateClient(idClient, client):
    global clients
    sizeOf = int(len(clients))

    for i in range(sizeOf):
        if idClient == clients.index(clients[i]):
            clients[i] = client
            print('READY!!\n')
        elif idClient not in clients:
            print(idClient, "isn't in client's database")


def deleteClient(idxClient):
    global clients

    clients.remove(clients[idxClient])
    print('Ready!')


def searchClient(nombre_Cliente):
    global clients

    for client in clients:
        if client != nombre_Cliente:
            continue
        else:
            return True


def _getField(field_name):
    field = None

    while not field:
        field = input("What's the client {}? ".format(field_name))

    return field


def _get_client():
    nombre_Cliente = None

    while not nombre_Cliente:
        nombre_Cliente = input("Nuevo cliente: ")

        if nombre_Cliente == 'exit':
            nombre_Cliente = None
            break

    if not nombre_Cliente:
        sys.exit()

    return nombre_Cliente


def setData():
    client = {
        'name': _getField('name'),
        'company': _getField('company'),
        'e-mail': _getField('e-mail'),
        'position': _getField('position')
    }

    return client


if __name__ == '__main__':
    _print_welcome()
    command = input()

    if command == 'c':
        client = setData()
        add_cliente(client)
        list_clients()
    elif command == 'l':
        list_clients()
    elif command == 'u':
        list_clients()
        print('\n')
        client = setData()
        idClient = int(input("Client's id is: "))
        updateClient(idClient, client)
        list_clients()
    elif command == 'd':
        list_clients()
        idxClient = int(input("Set the index client: "))
        deleteClient(idxClient)
        list_clients()
    elif command == 's':
        nombre_Cliente = input("What name do you wanna search? ")
        finder = searchClient(nombre_Cliente)

        if finder:
            print(" {} is in client's list".format(nombre_Cliente))
        else:
            print(" {} isn't in the client list, sorry :(".format(nombre_Cliente))


    else:
        print('Invalid command, type -h for help')

Mi codigo:
El único cambio que tiene es que la momento de actualizar el cliente, se actualiza todos los campos. (una mejora podría ser preguntar que campo se desea actualizar).

import sys
import os

clients = [
    {
        'name': 'Pedro',
        'company': 'Google',
        'email': '[email protected]',
        'postion': 'Sofware Engineer'
    },
    {
        'name': 'Juan',
        'company': 'Facebook',
        'email': '[email protected]',
        'postion': 'Data Engineer'
    }
    ]

def create_client(client):
    global clients
    if not (client in clients):
        clients.append(client)
    else: 
        os.system('clear')
        print('The client is already in client\'s list.')
        print('[Enter] to continue]')
        input()


def update_client(client_id):
    global clients
    
    if (len(clients) - 1 >= client_id):
        updated_client = ingress_client_data()
        clients[client_id] = updated_client
    else:
        os.system('clear')
        print('The client id isn\'t a valid id.')
        print('[Enter] to continue]')
        input()


def delete_client(client_id):
    global clients

    if (len(clients) - 1 >= client_id):
        del clients[client_id]
    else:
        os.system('clear')
        print('The client id isn\'t a valid id.')
        print('[Enter] to continue]')
        input()


def list_clients():
    
    for idx,client in enumerate(clients):
        print(' Id: {uid} | Name: {name} | Company: {company} | Email: {email} | Position: {postion}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            postion = client['postion']
        ))


def search_client(client_name):
    for client in clients:
        if client['name'] == client_name:
            return True
    return False


def ingress_client_data():
    client = {
        'name': get_client_fild('name'),
        'company': get_client_fild('company'),
        'email': get_client_fild('email'),
        'postion': get_client_fild('position')
    }
    return client


def get_client_fild(fild):
    return input('Insert the {}: '.format(fild))


def get_client_name():
    client_name = None

    while not (client_name):
        client_name = input('Insert the client name: ')
    return client_name


def _print_welcome():
    print('Welcome to Platzi Ventas.')
    print('*' * 25)
    print('Menu:')
    print('[C]reate client.')
    print('[U]pdate client.')
    print('[D]elete client.')
    print('[L]ist clients.')
    print('[S]earch client.')
    print('[E]xit.')
    print('Insert a command: ')


if __name__ == '__main__':
    opt = None

    while (opt != 'E') or (not opt):
        _print_welcome()
        opt = input().upper()
        if (opt == 'C'):
            os.system('clear')
            print('Creating a new client...')
            client = ingress_client_data()
            create_client(client)
        elif (opt == 'U'):
            os.system('clear')
            print('Updateing a client...')
            list_clients()
            print('-' * 25)
            client_id = int(get_client_fild('id'))
            update_client(client_id)
            print('-' * 25)
            list_clients()
        elif (opt == 'D'):
            os.system('clear')
            print('Deleting a client...')
            list_clients()
            print('-' * 25)
            client_id = int(get_client_fild('id'))
            delete_client(client_id)
        elif (opt == 'L'):
            os.system('clear')
            list_clients()
            print('[Enter] to continue]')
            input()
        elif (opt == 'S'):
            os.system('clear')
            client_name = get_client_name()
            found = search_client(client_name)
            
            if (found):
                print('The client {} is in client\'s list.'.format(client_name))
            else:
                print('The client {} isn\'t in client\'s list.'.format(client_name))
            print('[Enter] to continue]')
            input()
        elif (opt == 'E'):
            os.system('clear')
            sys.exit()
        else:
            os.system('clear')
            print('Try again! Invalid command.')
            print('[Enter] to continue]')
            input()
        os.system('clear')

Así me quedó después de completar las demás funciones usando la estructura de diccionarios, por si a alguien le sirve de ayuda.

import sys 
clients =[
   {
       'name' : 'pablo',
       'company' : 'Google',
       'email':'[email protected]',
       'position':'software engineer'
   },
    {
        'name':'ricardo',
       'company':'Facebook',
       'email':'[email protected]',
       'position':'Data engineer',
    }
    
]

def create_client(client):
    global clients
    
    if client not in clients:
        clients.append(client)
    else:
        print('Client is already in the client\'s list')
        

def list_clients():
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx, 
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))
            
    

def update_client(the_client, updated_client):
    global clients
    
    for idx, client in enumerate(clients):
        if clients[idx]==the_client:
            clients[idx]=updated_client
        elif idx==(len(clients)-1):
            _notInClientslist()
    
def delete_client(the_client):
    global clients
    
    for idx, client in enumerate(clients):
        if clients[idx]==the_client:
            clients.pop(idx)
        elif idx==(len(clients)-1):
            _notInClientslist()
        
        
def search_client(the_client):
    global clients
    
    for client in clients:
        if client != the_client:
            continue
        else:
            return True
    

def _print_welcome():
    print('WELCOME TO DANN VENTAS')
    print('*'*50)
    print('what would you like to do today')
    print('[C]reate client')
    print('[L]ist client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')
    
    
def _get_client_field(field_name):
    field = None
    
    while not field:
        field =input('what is the client {}?'.format(field_name))
        
    return field


def _getaclient():
    aclient = {
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position'),
        }
    return aclient

def _getclient_name():
    client_name = None
    
    while not client_name:
        client_name = input('what is the client name? ')
        
        if client_name == 'exit':
            client_name = None
            break
            
    if not client_name:
        sys.exit()
        
    return client_name

def _notInClientslist():
    return print('Client is not in the client\'s list')

if __name__ == '__main__':
    _print_welcome()
    
    command = input()
    command =command.upper()
    
    if command == 'C':
        client=_getaclient()
        create_client(client)
        list_clients()
    elif command == 'D':
        the_client = _getaclient()
        delete_client(the_client)
        list_clients()
    elif command == 'U':
        the_client=_getaclient()
        updated_client =_getaclient()
        update_client(the_client, updated_client)
        list_clients()
    elif command == 'L':
        list_clients()
    elif command == 'S':
        the_client = _getaclient()
        found =search_client(the_client)
        if found:
            print('The client is in the client\'s list')
        else:
            print('The client is not in our client\'s list')
    else:
        print('Invalid command')
<code>
import sys
clients = [
    {
        'name': 'Pedro',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software Engineer'
    },
    {
        'name': 'Juan',
        'company': 'Facebook',
        'email': '[email protected]',
        'position': 'Data Engineer'
    }
]

##################################################################
################# Funciones de la aplicacion #####################
##################################################################
def _print_welcome():
    print('WELCOME TO PLATZI VENTA')
    print('*'*50)
    print('WHAT WOULD YOU LIKE TO TODAY?')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]erch client')
    print('[L]ist clients')


def create_client(client_name):
    global clients
    if client_name not in clients:
        clients.append(client_name)
        listClients()
    else:
        print('User already is in the client\'s list!!!')


def update_client(client_name,client):
    global clients
    for idx, user in enumerate(clients):
        if user['name'] == client_name:
            clients[idx] = client
        else:
            continue


def delete_client(client_name):
    global clients
    if client_name in clients:
        index = clients.index(client_name)
        clients.pop(index)
        listClients()
    else:
        print('Client is not in clients list')


def search_client(client_name):
    global clients
    for client in clients:
        client = client.strip()
        if client != client_name:
            continue
        else:
            return True
        
def listClients():
    global clients
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(uid=idx,name=client['name'], company=client['company'], email=client['email'], position=client['position']))


##################################################################
################# Funciones de la auxuliares #####################
##################################################################
#def _add_comma():
    #global clients
    #clients+=', '


def _get_client_name():
    client_name =  None
    while not client_name:
        client_name = input('What is the clients\' name: ')
        if client_name == 'exit':
            client_name = None
            break

    if not client_name:
            sys.exit()

    return client_name


def _get_client_field(field_name):
    client_field = None
    while not client_field:
        client_field = input('What is the {}: '.format(field_name))
        if client_field == 'exit':
            client_field = None
            break

    if not client_field:
        sys.exit()

    return client_field

   
if __name__ == '__main__':
    _print_welcome()
    command = input('Option: ')
    command = command.upper()
    if command == 'C':
        client = {
                'name':_get_client_field('name'),
                'company':_get_client_field('company'),
                'email':_get_client_field('email'),
                'position':_get_client_field('position')
            }
            
        create_client(client)
    elif command == 'D':
        client_name = _get_client_name()
        delete_client(client_name)

    elif command == 'U':
        clientUpdated = {
            'name':_get_client_field('name'),
            'company':_get_client_field('company'),
            'email':_get_client_field('email'),
            'position':_get_client_field('position')
        }
        client_name = _get_client_name()
        update_client(client_name, clientUpdated)
        listClients()
    elif command == 'S':
        client_name = _get_client_name()
        found = search_client(client_name)  
        if found:
            print('The client is in client\'s list')
        else:
            print('The client {} is not in client\'s list'.format(client_name))
    elif command == 'L':
        listClients()
    else:
        print('Invalid option!!!')


Mi tarea

import sys
clientes = [
    {
        'name': 'Pablito',
        'company': 'YouPorn',
        'email': '[email protected]',
        'position': 'Developer'
    },
    {
        'name': 'BigJoe',
        'company': 'SpaceX',
        'email': '[email protected]',
        'position': 'Software Engineer'
    },
    {
        'name': 'TuPac',
        'company': 'HipHop',
        'email': '[email protected]',
        'position': 'MC'
    }
]


def create_cliente(client):
    global clientes
    if client not in clientes:
        clientes.append(client)
    else:
        print('Client already is in the client\'s list')


def update_cliente(client_id):
    global clientes
    if client_id:
        clientes[client_id] = _get_client_data()
        print('si estuvo')
    else:
        print('Client is not in our clients list.')


def delete_cliente(client_id):
    global clientes
    del(clientes[client_id])


def ls_clients():
    global clientes
    for id, cliente in enumerate(clientes):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = id,
            name = cliente['name'],
            company = cliente['company'],
            email = cliente['email'],
            position = cliente['position']
        ))


def ls_one_client(client_id):
    global clientes
    print('Client is in clients list.')
    cliente = clientes[client_id]
    print('{uid} | {name} | {company} | {email} | {position}'.format(
        uid = client_id,
        name = cliente['name'],
        company = cliente['company'],
        email = cliente['email'],
        position = cliente['position']
    ))


def _get_client_data():
    client_data = {
        'name' : _get_client_field('name'),
        'company' : _get_client_field('company'),
        'email' : _get_client_field('email'),
        'position' : _get_client_field('position')
    }
    return client_data


def _print_welcome():
    print("""                                         ___          |
                                     ___/   \___      |
                                    /   '---'   \     |
                       .-.          '--_______--'     |
        .-""`""-.    |(@ @)              / \          |
     _/`oOoOoOoOo`\_ \ \-/              /   \         |
    '.-=-=-=-=-=-=-.' \/@\             / \O/ \        |
      `-=.=-.-=.=-'    \ /\            /  |  \        |
         ^  ^  ^       _H_ \           / / \ \        |
    """)
    print ('*' * 55)
    print('             Welcome to PlatziStore')
    print('*' * 55)
    print('What would you like to do today ?')
    print('[L]ist client')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is your {}?: '.format(field_name))
    return field


def _get_client_id(client_name):
    global clientes
    bndr = False
    for id, client in enumerate(clientes):
        if client['name'] == client_name:
            print('id: ', id)
            return id
    print('The client: {} is not in our clients list.'.format(client_name))
    return None


## ---------------- main ----------------- ##
if __name__ == '__main__':
    _print_welcome()
    command = input()
    command = command.upper()

    if command == 'C':
        create_cliente(_get_client_data())
        ls_clients()

    elif command == 'L':
        ls_clients()

    elif command == 'D':
        client_name = _get_client_field('name')
        client_id = _get_client_id(client_name)
        if client_id:
            delete_cliente(client_id)
            ls_clients()

    elif command == 'U':
        client_id = _get_client_id(_get_client_field('name'))
        if client_id:
            update_cliente(client_id)
            ls_clients()

    elif command == 'S':
        client_name = _get_client_field('name')
        client_id = _get_client_id(client_name)
        if client_id != None:
            ls_one_client(client_id)

    else:
        print ('Invalid command')

Mi tarea:

import sys
clientes = [
    {
        'name': 'Pablito',
        'company': 'YouPorn',
        'email': '[email protected]',
        'position': 'Developer'
    },
    {
        'name': 'BigJoe',
        'company': 'SpaceX',
        'email': '[email protected]',
        'position': 'Software Engineer'
    },
    {
        'name': 'TuPac',
        'company': 'HipHop',
        'email': '[email protected]',
        'position': 'MC'
    }
]


def create_cliente(client):
    global clientes
    if client not in clientes:
        clientes.append(client)
    else:
        print('Client already is in the client\'s list')


def update_cliente(client_id):
    global clientes
    if client_id:
        clientes[client_id] = _get_client_data()
        print('si estuvo')
    else:
        print('Client is not in our clients list.')


def delete_cliente(client_id):
    global clientes
    del(clientes[client_id])


def ls_clients():
    global clientes
    for id, cliente in enumerate(clientes):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = id,
            name = cliente['name'],
            company = cliente['company'],
            email = cliente['email'],
            position = cliente['position']
        ))


def ls_one_client(client_id):
    global clientes
    print('Client is in clients list.')
    cliente = clientes[client_id]
    print('{uid} | {name} | {company} | {email} | {position}'.format(
        uid = client_id,
        name = cliente['name'],
        company = cliente['company'],
        email = cliente['email'],
        position = cliente['position']
    ))


def _get_client_data():
    client_data = {
        'name' : _get_client_field('name'),
        'company' : _get_client_field('company'),
        'email' : _get_client_field('email'),
        'position' : _get_client_field('position')
    }
    return client_data


def _print_welcome():
    print("""                                         ___          |
                                     ___/   \___      |
                                    /   '---'   \     |
                       .-.          '--_______--'     |
        .-""`""-.    |(@ @)              / \          |
     _/`oOoOoOoOo`\_ \ \-/              /   \         |
    '.-=-=-=-=-=-=-.' \/@\             / \O/ \        |
      `-=.=-.-=.=-'    \ /\            /  |  \        |
         ^  ^  ^       _H_ \           / / \ \        |
    """)
    print ('*' * 55)
    print('             Welcome to PlatziStore')
    print('*' * 55)
    print('What would you like to do today ?')
    print('[L]ist client')
    print('[C]reate client')
    print('[U]pdate client')
    print('[D]elete client')
    print('[S]earch client')


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is your {}?: '.format(field_name))
    return field


def _get_client_id(client_name):
    global clientes
    bndr = False
    for id, client in enumerate(clientes):
        if client['name'] == client_name:
            print('id: ', id)
            return id
    print('The client: {} is not in our clients list.'.format(client_name))
    return None


## ---------------- main ----------------- ##
if __name__ == '__main__':
    _print_welcome()
    command = input()
    command = command.upper()

    if command == 'C':
        create_cliente(_get_client_data())
        ls_clients()

    elif command == 'L':
        ls_clients()

    elif command == 'D':
        client_name = _get_client_field('name')
        client_id = _get_client_id(client_name)
        if client_id:
            delete_cliente(client_id)
            ls_clients()

    elif command == 'U':
        client_id = _get_client_id(_get_client_field('name'))
        if client_id:
            update_cliente(client_id)
            ls_clients()

    elif command == 'S':
        client_name = _get_client_field('name')
        client_id = _get_client_id(client_name)
        if client_id != None:
            ls_one_client(client_id)

    else:
        print ('Invalid command')

Aquí esta mi código con algunas modificaciones

import sys
last_name = None
company = None
email = None
position = None
name = None
command = None
command_update = None 
clients = [
	{
		"name": "Alyanna",
		"last name": "Roa",
		"company": "l&a boots",
		"email": "[email protected]",
		"position": "C.M.O"
	},
	{
		"name": "Edinson",
		"last name": "Requena",
		"company": "valve",
		"email": "[email protected]",
		"position": "Software engineer"
	},
	{
		"name": "Angel",
		"last name": "Verde",
		"company": "Google",
		"email": "[email protected]",
		"position": "Data engineer"		
	},
	{
		"name": "Takuma",
		"last name": "Zato",
		"company": "Google",
		"email": "[email protected]",
		"position": "Data engineer"		
	}

]

def create_client(client):
    global clients

    if client not in clients:
    	clients.append(client)

    else:
        print(f"Client {client} already in client's list")


def list_clients():
    print('uid |  name  |  last name  | company  | email  | position ')
    print('*' * 50)

    for idx, client in enumerate(clients):
        print('{uid} | {name} |  {last_name} | {company} | {email} | {position}'.format(
            uid=idx, 
            name=client['name'],
            last_name=client['last name'], 
            company=client['company'], 
            email=client['email'], 
            position=client['position']))


def update_client(client_id,updated_client):
	global clients

	if len(clients) - 1 >= client_id:
		clients[client_id] = updated_client


def _get_update_client(update_field):
	global command_update
	global name
	global last_name
	global company
	global email
	global position

	while not command_update:
		command_update = input("What is the client field that you want update? ")

	command_update.upper()

	if command_update == "N":
		while not name:
			name = input("What is the new name? ")
		return name

	elif command_update == "L":
		while not last_name:
			last_name = input("What is the new last name? ")
		return last_name

	elif command_update == "C":
		while not company:
			company = input("What is the new company? ")
		return company

	elif command_update == "E":
		while not email:
			email = input("What is the new email? ")
		return email

	elif command_update == "P":
		while not position:
			position = input("What is the new position? ")
		return position

	else:
		print("Invalid command, try again")


def delete_client(client_id):
    global clients

    for idx, client in enumerate(clients):
        if idx == client_id:
            del clients[idx] 
            break


def search_client(client_name):
    for client in clients:
        if client['name'] != client_name:
            continue
        else:
            return True


def _get_client_field(field_place):
    field = None

    while not field:
        field = input(f"what is the client {field_place}? ")
    
    return field


def _client_field():
	global command_update
	global command
	global clients
	client = {}

	if command == "C":
		client = {
			"name": _get_client_field("name"),
			"last name": _get_client_field("last name"),
			"company": _get_client_field("company"),
			"email": _get_client_field("email"),
			"position": _get_client_field("position"),
		}
		return client
	elif command == "U":
		_get_update_client(clients[client_id])
		if command_update == "N":
			client = {
				"name": name,
				"last name": client,
				"company": client,
				"email": client,
				"position": client,
			}
			return client
		elif command_update == "L":
			client = {
				"name": client,
				"last name": last_name,
				"company": client,
				"email": client,
				"position": client,
			}
			return client
		elif command_update == "C":
			client = {
				"name": client,
				"last name": client,
				"company": company,
				"email": client,
				"position": client,
			}
			return client
		elif command_update == "E":
			client = {
				"name": client,
				"last name": client,
				"company": client,
				"email": email,
				"position": client,
			}
			return client
		elif command_update == "P":
			client = {
				"name": client,
				"last name": clientnt,
				"company": client,
				"email": client,
				"position": position,
			}
			return client
		else:
			print("Invalid command, please try again")


def _not_in_clients(client_name):
	global clients

	if client_name not in clients:
		 print(client_name, "is not in client's list")


def _print_welcome():
	print("*"*20 ,"WELCOME TO THE DATA CENTER", "*"*20)
	print("What would yo like to do today?")
	print("[C]reate client")
	print("[R]ead client")
	print("[U]pdate client")
	print("[D]elete client")
	print("[S]earch client")


if __name__ == '__main__':
	_print_welcome()

	command = input()
	command = command.upper()


	if command == "C":
		client = _client_field()

		create_client(client)
		list_clients()

	elif command == "R":
		list_clients()

	elif command == "D":
		list_clients()
		print("-"*45)
		client_id = int(_get_client_field('id'))

		delete_client(client_id)
		print("-"*45)
		list_clients()

	elif command == "U":
		list_clients()
		client_id = int(input("What is the client id "))
		print("[N]ame client")
		print("[L]ast client")
		print("[C]ompany client")
		print("[E]mail client")
		print("[P]osition client")
		updated_client = _client_field()
		
		update_client(client_id,updated_client)
		list_clients()

	elif command == "S":
		client_name = _get_client_field('name')
		found = search_client(client_name)
        
		if found:
			print('The client is in the client\'s list')
		else:
			print('The client: {} is not in our client\'s list'.format(client_name))

	elif command == "E":
		_exit(exit)

	else:
		print("Invalid command, try again")```
import sys

clients = [
        {
        'name': 'pablo',
        'company': 'google',
        'email': '[email protected]',
        'position': 'Software engineer',
        },
        {
        'name': 'ricardo',
        'company': 'facebook',
        'email': '[email protected]',
        'position': 'Data engineer',  
        }
]


def create_client(client):
    global clients          # "global para usar una variable global"
    if client not in clients:
        clients.append(client)
    else:
        print('Client already is in the client\'s list')

def list_clients(): #it lists our client's list
    for idx,client in enumerate(clients):   #to create an index for each element in our list
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))

def delete_client(client_id): # it deletes a client name from our client list
    global clients
    for idx, client in enumerate(clients):
        if idx == client_id:
            del clients[idx]
    else:
        print('The client is not in our data base: ')
    list_clients()

def search_client(client_name):
    #with this method we separate our string with commas
    for client in clients:
        if client != client_name:
            continue
        else:
            return True

def update_client(client_id, updated_client):
    global clients
    if len(clients) - 1 >= client_id:
        clients[client_id] = updated_client
    else:
        print("the client doesn't exits")




def _get_client_field(field_name, message='what is the client {}?'):
    field = None

    while not field: 
        field = input(message.format(field_name))
    return field 

def _get_client_from_user():
     client = {
                'name':_get_client_field('name'),
                'company': _get_client_field('company'),
                'email': _get_client_field('email'),
                'position': _get_client_field('position'),
            }
     return client 



def _print_welcome():
    print('welcome to my store')
    print('*'*70)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[D]elete client')
    print('[U]pdate client')
    print('[S]earch client')
    print('[L]ist of clients')
    print('[E]xit')


if __name__=='__main__':

    while(True):
        _print_welcome()
        command = input()
        command = command.upper()

        if command == 'C':
            client = _get_client_from_user()
            create_client(client)
            list_clients()

        elif command == 'L':
            list_clients()

        elif command == 'D':
            client_id = int(_get_client_field('id'))
            delete_client(client_id)

        elif command == 'U':
            client_id = int(_get_client_field('id'))
            updated_client = _get_client_from_user()
            update_client(client_id, updated_client)
            list_clients()

        elif command == 'S':
            client_name = _get_client_name()
            found = search_client(client_name)
            if found: 
                print('The client {} is in the client\'s list '.format(client_name))
            else: 
                print('The client {} is not in our client\'s list '.format(client_name))
        elif command == 'E':
            break

        else:
            print('Invalid Command')
   
import sys

clients = [
    {
    'name': 'Sven',
    'company': 'Tesla',
    'email': '[email protected]',
    'position': 'Software engineer'
    },
    {
    'name': 'Javier',
    'company': 'SpaceX',
    'email': '[email protected]',
    'position': 'Data engineer'
    },
    {
    'name': 'Richard',
    'company': 'Gigante',
    'email': '[email protected]',
    'position': 'Accountant'
    },
    {
    'name': 'Isabella',
    'company': 'Liverpool',
    'email': '[email protected]',
    'position': 'CCO'
    }
]

def whatsName(type):
    name = None
    while not name:
        name = input('What is the client name to be {}?\n------> '.format(type))
        if name == 'exit':
            name = None
            break
    if not name:
        sys.exit()
    return name


def addClient(client):
    global clients
    if client not in clients:
        clients.append(client)
        print(type(clients))
    else:
        print('Client already in client\'s list')


def _get_client_field(field_name):
    field = None
    while not field:
        field = input('What is the client {}? '.format(field_name))
        if field == 'exit':
            field = None
            break
    if not field:
        sys.exit()
    return field


def createClient():
    client = {
        'name': _get_client_field('name'),
        'company': _get_client_field('company'),
        'email': _get_client_field('email'),
        'position': _get_client_field('position')
    }
    addClient(client)


def showClients():
    global clients
    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
        uid = idx,
        name = client['name'],
        company = client['company'],
        email = client['email'],
        position = client['position']
        ))


def updateClient():
    global clients
    check = None
    name = whatsName('update')
    for idx, client in enumerate(clients):
        if client['name'] == name:
            check = 1
            print('Enter the new values:')
            client['name'] = _get_client_field('name')
            client['company'] = _get_client_field('company')
            client['email'] = _get_client_field('email')
            client['position'] = _get_client_field('position')
            showClients()
    if not check:
        print('Client "{}" is not in client list'.format(name))


def deleteClient():
    global clients
    idx = searchClient('deleted')
    if idx >= 0:
        del clients[idx]
        showClients()
    else:
        sys.exit()


def searchClient(type):
    global clients
    check = None
    name = whatsName(type)
    for idx, client in enumerate(clients):
        if client['name'] == name:
            check = 1
            print('The client "{}" is in the client\'s list'.format(name))
            break
    if not check:
        print('The client "{}" is NOT in our client\'s list'.format(name))
        return -1
    else:
        return idx


def _printWelcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' * 50)
    print('What whould you like to do today?:\n',
    '[C]reate client\n',
    '[L]ist client\n',
    '[U]pdate client\n',
    '[D]elete client\n',
    '[S]earch client')


if __name__ == '__main__':
    _printWelcome()
    opt = input('--------> ')
    opt = opt.upper()
    if opt == 'C':
        print('== Create Client ==')
        createClient()
        showClients()
    if opt == 'L':
        print('== List Clients ==')
        showClients()
    if opt == 'U':
        print('== Update Client ==')
        updateClient()
    if opt == 'D':
        print('== Delete Client ==')
        deleteClient()
    if opt == 'S':
        print('== Search Client ==')
        searchClient('search')

Use una librería que encontré aquí para tabular los datos del cliente.
Aquí mi solución al reto:

from tabulate import tabulate
import sys, os # Importamos librerias



clients = [
    {
        'name':'Natalia',
        'lastname':'Sanchez',
        'company':'Onelink',
        'email':'[email protected]',
        'position':'Assistant'
    },
    {
        'name':'Daniel',
        'lastname':'Sanchez',
        'company':'Shimano',
        'email':'[email protected]',
        'position':'Manager'
    }
] # Definimos algunos clientes

def create_client(): # Funcion para crear clientes

    client = _get_client()

    if client not in clients:

        clients.append(client)
        print('Client done...')

    else:

        print('Client already is in client\'s list. \n')
        

def delete_client(): # Funcion para borrar clientes

    indexs = validate_client(field_options())

    if len(indexs) == 1:

        view_clients(indexs)
        clients.remove(clients[indexs[0]])

    elif len(indexs) != 0:

        value = None
        done = False

        while not value:

            _clear_screen()
            view_clients(indexs)
            value = input('What is the client\'s index to remove? /[E]xit/[M]enu \n')
            _aditional_commands(value.upper())

            for idx in indexs:

                if value != str(idx):

                    continue

                else:

                    clients.remove(clients[indexs[idx]])
                    _clear_screen()
                    print('Client remove...\n')
                    done = True

            if not done:

                value = None
    else:

        not_found_menssage()


def update_client(): # Funcion para actualizar clientes

    indexs = validate_client(field_options())
    client_updated = _get_client_updated()

    if len(indexs) == 1:

        view_clients(indexs)
        clients[indexs[0]] = client_updated

    elif len(indexs) != 0:

        value = None
        done = False

        while not value:

            _clear_screen()
            view_clients(indexs)
            value = input('What is the client\'s index to update? /[E]xit/[M]enu \n')
            _aditional_commands(value.upper())

            for idx in indexs:

                if value != str(idx):

                    continue

                else:

                    clients[indexs[idx]] = client_updated
                    _clear_screen()
                    print('Client updated...\n')
                    done = True

            if not done:
                
                value = None
    else:
        not_found_menssage()


def search_client(): # Funcion para verificar si el cliente esta en el sistema

    indexs = validate_client(field_options())    

    if indexs:

        found_message()
        answer = None
        clients_founds = []

        while not answer:   

            answer = input('Do you want view client\'s information? [Y]es/[N]ot \n')
            answer = answer.upper()
            _clear_screen()

            if answer != 'Y' and answer != 'N':

                answer = None
                continue

            elif answer == 'Y':

                view_clients(indexs)  

    else:

        not_found_menssage()


def validate_client(field):

    index = []
    _clear_screen()
    value = None

    while not value:

        value = input(f'Insert {field} to search. /[R]eturn/[E]xit/[M]enu\n')
        _clear_screen()
        value = value.capitalize()
        _aditional_commands(value)
        
        if value == 'R':

            validate_client(field_options())

    for client in clients:

        if client[field] != value:

            continue

        else:

            index.append(clients.index(client))
    
    return index


def not_found_menssage(): # Mensaje de cliente no encontrado
    
    print('The client is not in the client\'s list. \n')


def found_message(): # Mensaje de cliente encontrado

    print('Client found... \n')


def _get_client():

    client = {
            'name': _get_client_field('name'),
            'lastname': _get_client_field('lastname'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position')
        }

    return client

def _get_client_updated():

    return _get_client()


def client_commands(command):

    command = command.upper()

    if command == 'C':

        create_client()

    elif command == 'D':

        delete_client()

    elif command == 'U':

        update_client()

    elif command == 'S':

        search_client() 

    elif command == 'L':

        list_clients()

    elif command == 'E':

        _clear_screen()
        _exit_program()

    else:

        print('Invalid command\n')


def list_clients(): # Lista los clientes registrados

    if clients:

        print(tabulate(clients, headers = 'keys', showindex=True))
        print('\n')

    else:

        print('Not clients in this Database.')


def view_clients(indexs):
    
    clients_to_view =[]

    for idx in indexs:

        clients_to_view.append(clients[idx])

    print(tabulate(clients_to_view, headers = 'keys', showindex=True))
    print('\n')


def _get_client_field(field_name):

    field = None

    while not field:

        field = input(f'What is the client {field_name}?/[E]xit/[M]enu \n')
    
    _aditional_commands(field)
    _clear_screen()

    return field

def field_options():

        print('Select one option:')
        print('[N]ame')
        print('[L]astname')
        print('[C]ompany')
        print('[EM]ail')
        print('[P]osition')
        print('[M]enu')
        print('[E]xit')

        return field_commands()


def field_commands():

    command = None
    command = input()
    command = command.upper()
           
    if command == 'N':

        field = 'name'

    elif command == 'L':

        field = 'lastname'

    elif command == 'C':

        field = 'company'

    elif command == 'EM':

        field = 'email'

    elif command == 'P':

        field = 'position'

    elif not command:

        field_options()

    else:

        _aditional_commands(command)
        _clear_screen()
        print('Invalid command \n') 
        field_options() 

    return field 


def _aditional_commands(command):

    if command == 'E': # Nos saca del sistema si no se desea ingresar un cliente

        client_commands(command)

    elif command == 'M': # Nos devuelve al menú principal

        command = None
        _clear_screen()
        run(command)


def _print_welcome(): # Funcion de bienvenida

    print('*' * 28)
    print('**WELCOME TO PLATZI VENTAS**')
    print('*' * 28 + '\n \n')
    print('What would you like to do today? \n')
    

def client_options(): # Funcion que despliega las opciones de sistema

    print('[C]reate client')
    print('[D]elete client')
    print('[L]ist clients')
    print('[S]earch client')
    print('[U]pdate client')
    print('[E]xit')


def run(command): # Funcion que mantiene el programa activo hasta que sea ejecutada la orden de salir

    while command != 'E':

        client_options()
        command = input()
        _clear_screen()
        client_commands(command)


def _clear_screen(): # Funcion que limpia la consola en donde estemos trabajando

    if os.name == 'posix':

        os.system('clear')

    elif os.name == "ce" or os.name == "nt" or os.name == "dos":

        os.system('cls')


def _exit_program(): # Funcion para salir del sistema

    sys.exit()


if __name__ == '__main__':
    
    _print_welcome()
    
    command = ''

    run(command)```

Mi versión

import os, sys

clients = [
    {
        'name': 'Antonio',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Software engineer',
    },
    {
        'name': 'Miguel',
        'company': 'Google',
        'email': '[email protected]',
        'position': 'Web designer',
    },
]

def create_client(client):
    global clients 

    if client not in clients:
        clients.append(client)
        
    else:
        print('Client already is in the client\'s list')


def update_client_field(client_name, client_field, option):
    global clients

    if search_client(client_name):
        for i in range(len(clients)):
            if client_name == clients[i]['name']:
                if option == '1':
                    clients[i]['name'] = client_field
                elif option == '2':
                    clients[i]['company'] = client_field
                elif option == '3':
                    clients[i]['email'] = client_field
                elif option == '4':
                    clients[i]['position'] = client_field
        
    else:
        print('Client is not in clients list!')


def delete_client(client_name):
    global clients

    if search_client(client_name):
        for i in range(len(clients)):
            if client_name == clients[i]['name']:
                clients.remove(clients[i])
                break
    else:
        print('Client is not in clients list')


def search_client(client_name):
    global clients
    
    for i in range(len(clients)):
        if client_name == clients[i]['name']:
            return True
    return False



def list_clients():
    global clients 

    for idx, client in enumerate(clients):
        print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid = idx,
            name = client['name'],
            company = client['company'],
            email = client['email'],
            position = client['position']))


def _print_welcome():
    print('WELCOME')
    print('*'*50)
    print('What would you like to do?')
    print('[C]Create client')
    print('[L]List clients')
    print('[U]Update client')
    print('[D]Delete client')
    print('[S]Search client')
    print('[E]Exit')


def _print_update_options():
    print('Field update options')
    print('-'*50)
    print('[1]Update name')
    print('[2]Update company')
    print('[3]Update email')
    print('[4]Update position')

def _print_update_field(option):
        print('{}'.format(option))
        q = 'What is the updated client'
        if option == '1':
            return input('{} {field}? '.format(q, field = 'name'))
        elif option == '2':
            return input('{} {field}? '.format(q, field = 'company'))
        elif option == '3':
             return input('{} {field}? '.format(q, field = 'email'))
        elif option == '4':
            return input('{} {field}? '.format(q, field = 'position'))
        else:
            print('Wrong option. Try again!')
        
    
def _get_client_field(field_name):
    field = None

    while not field:
        field = input('What is the client {}?'.format(field_name))
    return  field

def _get_client_name():
    return input('What is the client name? ')

if __name__ == '__main__':

    exit_app = False
    
    while exit_app != True:
        _print_welcome()
        
        command = input()
        command = command.upper()

        if command == 'C':
            client = {
                'name': _get_client_field('name'), 
                'company': _get_client_field('company'),
                'email' : _get_client_field('email'),
                'position' : _get_client_field('position'),
            }
            create_client(client)
            list_clients()
        elif command == 'L':
            list_clients()
        elif command == 'D':
            client_name = _get_client_name()
            delete_client(client_name)
            list_clients()
        elif command == 'U':
            client_name = _get_client_name()            
            _print_update_options()
            option = input('Select an option: ')
            client_field = _print_update_field(option)
            update_client_field(client_name, client_field, option)
            list_clients()
        elif command == 'S':
            client_name = _get_client_name()
            found = search_client(client_name)
            if found:
                print('The client is in the client\'s list')
            else:
                print('The client: {} isn\'t in our client\'s list'.format(client_name))
        elif command == 'E':
            exit_app = True
        else:
            print('Invalid command ')

Parce en el diccionario de rae de python no esta la llave empanada y su valor… 😦 python me decepcionaste.

Hola, ésta es mi versión del código

import sys

clients=[
    {
     'name': 'Pablo',
     'company': 'Google',
     'email': '[email protected]',
     'position': 'Software engineer'
     
     },
     {
     'name': 'Ricardo',
     'company': 'Facebook',
     'email': '[email protected]',
     'position': 'Data engineer'
      }
]

def create_client(client):
    global clients
    
    if client not in clients:
        clients.append( client)
    else:
        print('Client already is in the client\'s list')
    
#doble espacio para separar las funciones entre si    


def list_clients():
    global clients
    
    for idx in range(0, len(clients)):
        print_client(idx)


def print_client(idx):
    global clients
    
    client=clients[idx]
    print('{uid} | {name} | {company} | {email} | {position}'.format(
            uid=idx,
            name= client['name'],
            company= client['company'],
            email=client['email'],
            position= client['position']))


def update_client(client_email, updated_client):
    global clients
    
    intPos=search_client(client_email)
    
    if intPos>=0:
        if updated_client['email'].lower==client_email.lower():
            clients[intPos]=updated_client
        else:
            intPos2=search_client(updated_client['email'])
            if intPos2==-1:
                clients[intPos]=updated_client
            else:
                print('User already exits in other place')
    else:
        _print_err_find()
        

def delete_client(client_email):
    global clients
    
    intPos=search_client(client_email)
    if intPos>=0:
        rem_Client=clients.pop(intPos)
        
        print (rem_Client)
    else:
        _print_err_find()
    
     
def search_client(client_email):
    global clients
    
    for idx, client in enumerate(clients):
       
        if client['email'].lower() ==client_email.lower(): 
            return idx
            break
    
    return -1
    

def _print_welcome():
    print('WELCOME TO PLATZI VENTAS')
    print('*' *50)
    print('What would you like to do today?')
    print('[C]reate client')
    print('[D]elete client')
    print('[U]pdate client')
    print('[S]earch client')
    print('[L]ist client')
    print('[E]xit App')

def _get_client_field(field_name):
    field=None
    
    while not field:
        field=input('What is the client{}?'.format(field_name))
        
    if not field:
        sys.exit()
        
    return field


def _get_client():
    client={
            'name': _get_client_field('name'),
            'company': _get_client_field('company'),
            'email': _get_client_field('email'),
            'position': _get_client_field('position')
        
       }
            
    return client
    

def _print_err_find():
     print('Client is not in clients list')
    
    
if __name__=='__main__':
    comando=''
    while comando.upper()!='E':
        _print_welcome()
        comando=input()
        if comando.upper()=='C':
            client=_get_client()
            create_client(client)
            list_clients()
        elif comando.upper()=='D':
            client_email=_get_client_field('email')
            delete_client(client_email)
            list_clients()
        elif comando.upper()=='U':
            client_email=_get_client_field('email')
            updated_client_name=_get_client()
            update_client(client_email, updated_client_name)
            list_clients()
        elif comando.upper()=='S':
            client_email=_get_client_field('email')
            found=search_client(client_email)
            
            if found>=0:
                print(f'the client email: {client_email} is in the client\'s list')
                print_client(found)
            else:
                print('the client eamil: {} is not in the client\'s list'.format(client_email))
        elif comando.upper()=='L':
            list_clients()
        elif comando.upper()=='E':
            continue
        else:
            print('Invalid command')
    
            
    print('Have a nice day')```

En python no existen los prototypes???
lo digo por javascript ahi hya una funcion que se llama .prototype, que te ayuda a armar clases mas facil.

Aquí es esta mi versión

import os
import sys

 #INI HOTFIX-REPLACE-LIST-FOR-DICTIONARIES
list_clients =  [
    {
        'name'        :'pablo',
        'company'     :'Google',
        'email'       :'[email protected]',
        'position'    :'Developer Junior',
    },
    {
        'name'        :'ricardo',
        'company'     :'Google',
        'email'       :'[email protected]',
        'position'    :'Developer Senior',
    },
    {
        'name'        :'antonio',
        'company'     :'Facebook',
        'email'       :'[email protected]',
        'position'    :'Developer Senior',
    },
    {
        'name'        :'gerardo',
        'company'     :'facebook',
        'email'       :'[email protected]',
        'position'    :'Developer Junior',
    },
    {
        'name'        :'pablo',
        'company'     :'Google',
        'email'       :'[email protected]',
        'position'    :'Developer Junior',
    },
    {
        'name'        :'carlos',
        'company'     :'Google',
        'email'       :'[email protected]',
        'position'    :'Developer Senior',
    },
    {
        'name'        :'isnardo',
        'company'     :'Facebook',
        'email'       :'[email protected]',
        'position'    :'Developer Senior',
    },
    {
        'name'        :'jose',
        'company'     :'facebook',
        'email'       :'[email protected]',
        'position'    :'Developer Junior',
    }
]

#FUNCTION
#crear cliente
def create_client(arg_client):
    global list_clients
    if arg_client not in list_clients:
        list_clients.append(arg_client)
    else:
        print('Client is already in the list')
        


#actualizar cliente
def update_client(arg_client_id, arg_updated_client):
     global list_clients
     if len(list_clients)-1  >=  arg_client_id :
         print('len(list_clients)-1', len(list_clients)-1 )
         list_clients[arg_client_id] = arg_updated_client
     else:
         print('The client is not in the list ')
     
 
 
#borrar cliente
def delete_client(arg_client_id):
    global list_clients
    for idx,client in enumerate(list_clients):
        if idx == arg_client_id:
            del list_clients[idx]
            break

      
#buscar cliente   
def search_client(arg_client_name):
    global list_clients
    coincidence = False
    print('Search now!......')
    for index_client, client in enumerate(list_clients):
        if client ['name'] != arg_client_name:
            continue
        else:
            coincidence =True
            print('{uid}    |   {name}    |     {company}    |   {email}  |     {position}'.format(
                uid=index_client,
                name=       client['name'],
                company=    client['company'],
                email=      client['email'],
                position=   client['position']))
 
    return coincidence


#new imprimir cliente
def print_list_client(arg_client_name = None):
    global list_clients    
    if  not arg_client_name :
        #print all list client
        print('*' * 50)
        print("The list client is now:")
        print('*' * 50)    
        print('uid |  name  | company  | email  | position ')
        print('*' * 50)
        for index_client, client in enumerate(list_clients):
            print('{uid}    |   {name}    |     {company}    |   {email}  |     {position}'.format(
                uid=index_client,
                name=       client['name'],
                company=    client['company'],
                email=      client['email'],
                position=   client['position']))
    else:
        #print one client
        print('*' * 50)
        print("The list client is:")
        print('*' * 50)
        print('uid |  name  | company  | email  | position ')
        print('*' * 50) 
        for index_client,client in enumerate(list_clients):
            if client ['name'] != arg_client_name:
                continue
            else:
                print('{uid}    |   {name}    |     {company}    |   {email}  |     {position}'.format(
                    uid=index_client,
                    name=       client['name'],
                    company=    client['company'],
                    email=      client['email'],
                    position=   client['position']))
                break      

#MESSENGER
def _print_messenger_welcome():
    print('*' * 50)
    print('WELCOME TO PLATZI-VENTAS')
    print('*' * 50)
    print('What would you like to do today')
    print('[C]reate client')
    print('[D]delete client')
    print('[U]pdate client')
    print('[S]earch client')
    print('[L]ist client')
    print('[E]xit')
    
    
def _print_messenger_get_client_name():
    client_name = None
    while not client_name:
        client_name = input('What is the client name: ')
        if ( client_name == "exit" or client_name == "EXIT" ):
            client_name =  None
            break
    if not client_name:
        sys.exit(0)
    return client_name


#obtiene los valores por campo
def _get_client_field(field_name, message='What is the client {}?:  '):
    field = None
    while not field:
        field = input(message.format(field_name))
    return field


#obtiene los valores del usuario
def _get_client_from_user ():
    client = {
        'name'          :_get_client_field('name'),
        'company'       :_get_client_field('company'),
        'email'         :_get_client_field('email'),
        'position'      :_get_client_field('position'),   
    }
    return client
    
    
def _print_messenger_is_not_client_name():
    return print("the name of client is not in the list clients")


def operation ():
    os.system('clear')
    _print_messenger_welcome()
    command=input('Select one option: ')
    if ( command == 'C'  or  command == 'c' ):
        print('*' * 50)
        print("Operation : Create Client")
        print('*' * 50)
        client = _get_client_from_user()
        create_client(client)
        print_list_client()
        
    if ( command == 'D' or command == 'd' ):  
        print('*' * 50)
        print("Operation: Delete Client")
        print('*' * 50)
        print_list_client()
        print('*' * 50)
        client_id= int(_get_client_field('id'))
        delete_client(client_id)
        print_list_client()
        
    if ( command == 'U' or command == 'u' ):
        print('*' * 50)
        print("Operation: Update Client")
        print('*' * 50)
        print_list_client()
        print()
        print()
        client_id = int(_get_client_field('id'))
        updated_client = _get_client_from_user()
        update_client(client_id,updated_client)
        print()
        print()
        print_list_client()
        
    if ( command == 'L' or command == 'l' ):
        print('*' * 50)
        print("Operation: List Client")
        print('*' * 50)
        print_list_client()
        
    if ( command == 'S' or command == 's'):
        print('*' * 50)
        print("Operation: Search Client")
        print('*' * 50)
        client_name =_print_messenger_get_client_name()
        found = search_client( client_name )
        if found:
            print("The client name is already in the list")
            #print_list_client(client_name)
            pass
        else:
            print("The client name: {} is not  our client list".format( client_name) )
    if ( command == 'E' or command == 'e'):
        print("Thank you, see you next day") 
        sys.exit(0)
    loop()


def loop():
    command=input ("Do you want something else? Y/N: ")
    if ( command == 'Y' or command == 'y'):
        operation()
    if ( command == 'N' or command == 'n'):
        print("Thank you, see you next day")
        sys.exit(0)
    else:
        print("Option incorrect, please select  (Y)es or (N)o, for to coninue...  ")
        loop()
    return


 #MAIN       
if __name__ == "__main__":
    operation()