xp_cmdshell only sends first character of string
The problem is with your variable declaration varchar.

The command_string is   varchar(8000) or nvarchar(4000)

so define your variable along with proper length  to avoid string truncation


  DECLARE
      @inspection varchar


should be 


  DECLARE
      @inspection varchar(8000)


couple of things as well (since I dont know Python).


Make sure you print or select @inspection and see that you can run the produced command successfully.
Use a variable for success or failure and raise an error message when the command fails.


e.g. 

declare @result int
DECLARE @inspection varchar(8000)  
exec @result = master..xp_cmdshell @inspection 
if @result &lt;&gt; 0
begin 
    print 'Python script errored out !!'
    RAISERROR ('Python script errored out', 16, 1)
end