import time
import machine
from machine import I2C, SoftI2C, Pin
from pico_i2c_lcd import I2cLcd
i2c = SoftI2C(sda=Pin(4), scl=Pin(7), freq=400000)
lcd_addr=i2c.scan()[0]
lcd=I2cLcd(i2c, lcd_addr, 2, 16)
lcd.move_to(0, 0)
s= input("enter string:")
i=0
while(i>=0):
lcd.move_to(i,0)
lcd.putstr(s)
time.sleep(1)
i=i+1
lcd.clear()