How to create a form in Python?
form for what?
or do you mean Panels by that? Checkout the panel examples in this case, Blender > Scripting view > Text editor > Templates or have a look at the API docs:
I'm sitting, waiting, wishing, building Blender in superstition...