I want to create a TCP client to connect with a TCP server on another laptop and send some data periodically every minute. Please write some python code to do that.
Sure, here is a simple Python script that uses the socket library to create a TCP client. This script connects to a server, sends a message, and then waits for a minute before sending the next message.

```python
import socket
import time

def create_tcp_client(server_ip, server_port):
    # Create a TCP/IP socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    # Connect the socket to the server's port
    server_address = (server_ip, server_port)
    sock.connect(server_address)

    try:
        while True:
            # Define the message to be sent
            message = 'This is the message to be sent.'
            sock.sendall(message.encode())

            # Wait for a minute before sending the next message
            time.sleep(60)

    finally:
        # Close the socket
        sock.close()

# Replace with your server's IP and port
create_tcp_client('192.168.1.2', 12345)
```

Please replace '192.168.1.2' and 12345 with your server's IP address and port number. Also, you can replace the message with the data you want to send. This script will keep running and sending messages every minute until you stop it.
Thanks for the code! I have a question. How can I make the script send the data immediately after it is created, instead of waiting for a minute?
To make the script send the data immediately after it is created, you can remove the following line:

```python
time.sleep(60)
```

This line is responsible for waiting for a minute before sending the next message. Without this line, the script will send the data immediately after it is created and then start looping.

Here is the updated code:

```python
import socket
import time

def create_tcp_client(server_ip, server_port):
    # Create a TCP/IP socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    # Connect the socket to the server's port
    server_address = (server_ip, server_port)
    sock.connect(server_address)

    try:
        while True:
            # Define the message to be sent
            message = 'This is the message to be sent.'
            sock.sendall(message.encode())

            # Send the data immediately
            # time.sleep(60)

    finally:
        # Close the socket
        sock.close()

# Replace with your server's IP and port
create_tcp_client('192.168.1.2', 12345)
```

Please note that the server may not be able to handle all the data at once, so it is important to adjust the delay between messages depending on the server's capabilities.
Can you now show me Kotlin code that does the same? The Kotlin version should wait 15 seconds.